diff options
-rw-r--r-- | app/controllers/request_controller.rb | 6 | ||||
-rw-r--r-- | app/models/track_thing.rb | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 79b8e4816..1db038c92 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -134,7 +134,6 @@ class RequestController < ApplicationController @title = "View and search requests" sortby = "newest" @page = get_search_page_from_params if !@page # used in cache case, as perform_search sets @page as side effect - behavior_cache :tag => [@view, @page] do xapian_object = perform_search([InfoRequestEvent], query, sortby, 'request_collapse') @list_results = xapian_object.results.map { |r| r[:model] } @@ -142,9 +141,8 @@ class RequestController < ApplicationController end @title = @title + " (page " + @page.to_s + ")" if (@page > 1) - - # XXX need to reinstate the following; @track_thing had previously been set to "TrackThing.create_track_for_all_new_requests" and "TrackThing.create_track_for_all_successful_requests" - # @feed_autodetect = [ { :url => do_track_url(@track_thing, 'feed'), :title => @track_thing.params[:title_in_rss], :has_json => true } ] + @track_thing = TrackThing.create_track_for_search_query(query) + @feed_autodetect = [ { :url => do_track_url(@track_thing, 'feed'), :title => @track_thing.params[:title_in_rss], :has_json => true } ] # Don't let robots go more than 20 pages in if @page > 20 diff --git a/app/models/track_thing.rb b/app/models/track_thing.rb index 1cd957549..82848341d 100644 --- a/app/models/track_thing.rb +++ b/app/models/track_thing.rb @@ -119,6 +119,11 @@ class TrackThing < ActiveRecord::Base end end track_thing.track_query = query + # XXX should extract requested_by:, request:, requested_from: + # and stick their values into the respective relations. + # Should also update "params" to make the list_description + # nicer and more generic. It will need to do some clever + # parsing of the query to do this nicely return track_thing end |