Commit a8b15031684fe8c2d7dd9b20938bcf53935e97dc
1 parent
f25bd3ac
Exists in
master
and in
28 other branches
Support old search URLs
Showing
1 changed file
with
7 additions
and
0 deletions
Show diff stats
app/controllers/public/search_controller.rb
... | ... | @@ -4,10 +4,17 @@ class SearchController < PublicController |
4 | 4 | include SearchHelper |
5 | 5 | include ActionView::Helpers::NumberHelper |
6 | 6 | |
7 | + before_filter :redirect_asset_param, :except => [:facets_browse, :assets] | |
7 | 8 | before_filter :load_category |
8 | 9 | before_filter :load_search_assets |
9 | 10 | before_filter :load_query |
10 | 11 | |
12 | + # Backwards compatibility with old URLs | |
13 | + def redirect_asset_param | |
14 | + return unless params.has_key?(:asset) | |
15 | + redirect_to params.merge(:action => params.delete(:asset)) | |
16 | + end | |
17 | + | |
11 | 18 | no_design_blocks |
12 | 19 | |
13 | 20 | def facets_browse | ... | ... |