aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-01-31 12:51:15 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-01-31 12:51:15 +1100
commit5ff4b4610a810ff29750cd135574700c49929892 (patch)
tree40fef4a5dd26973371c9120f8cadba14db797171
parentd85a11d1a6072abe48ff75cc47624e104fa42c4a (diff)
Access view helper from controller using view_context
-rw-r--r--app/controllers/track_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/track_controller.rb b/app/controllers/track_controller.rb
index 9b4746bde..23d79b30c 100644
--- a/app/controllers/track_controller.rb
+++ b/app/controllers/track_controller.rb
@@ -158,7 +158,7 @@ class TrackController < ApplicationController
@xapian_object = perform_search([InfoRequestEvent], @track_thing.track_query, @track_thing.params[:feed_sortby], nil, 25, 1)
respond_to do |format|
format.json { render :json => @xapian_object.results.map { |r| r[:model].json_for_api(true,
- lambda { |t| @template.highlight_and_excerpt(t, @xapian_object.words_to_highlight, 150) }
+ lambda { |t| view_context.highlight_and_excerpt(t, @xapian_object.words_to_highlight, 150) }
) } }
format.any { render :template => 'track/atom_feed.atom', :layout => false, :content_type => :atom }
end