diff options
Diffstat (limited to 'app/controllers/public_body_controller.rb')
-rw-r--r-- | app/controllers/public_body_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index e64644a1b..cc3d0b64a 100644 --- a/app/controllers/public_body_controller.rb +++ b/app/controllers/public_body_controller.rb @@ -55,7 +55,12 @@ class PublicBodyController < ApplicationController @xapian_requests = nil end + flash.keep(:search_params) + @track_thing = TrackThing.create_track_for_public_body(@public_body) + if @user + @existing_track = TrackThing.find_existing(@user, @track_thing) + end @feed_autodetect = [ { :url => do_track_url(@track_thing, 'feed'), :title => @track_thing.params[:title_in_rss], :has_json => true } ] respond_to do |format| @@ -349,6 +354,7 @@ class PublicBodyController < ApplicationController # Since acts_as_xapian doesn't support the Partial match flag, we work around it # by making the last work a wildcard, which is quite the same query = params[:query] + flash[:search_params] = params.slice(:query, :bodies, :page) @xapian_requests = perform_search_typeahead(query, PublicBody) render :partial => "public_body/search_ahead" end |