Commit 8c6bca299a63f9c7d882504e894f2e997bb3fd54
1 parent
287d9504
Exists in
master
and in
29 other branches
rails3: fix params from routes with wildcards
Routes with wildcards returns string (do not need to transform from array to string anymore).
Showing
3 changed files
with
3 additions
and
3 deletions
 
Show diff stats
app/controllers/application_controller.rb
| ... | ... | @@ -167,7 +167,7 @@ class ApplicationController < ActionController::Base | 
| 167 | 167 | |
| 168 | 168 | def load_category | 
| 169 | 169 | unless params[:category_path].blank? | 
| 170 | - path = params[:category_path].join('/') | |
| 170 | + path = params[:category_path] | |
| 171 | 171 | @category = environment.categories.find_by_path(path) | 
| 172 | 172 | if @category.nil? | 
| 173 | 173 | render_not_found(path) | ... | ... | 
app/controllers/public/content_viewer_controller.rb
app/controllers/public/search_controller.rb
| ... | ... | @@ -159,7 +159,7 @@ class SearchController < PublicController | 
| 159 | 159 | if params[:category_path].blank? | 
| 160 | 160 | render_not_found if params[:action] == 'category_index' | 
| 161 | 161 | else | 
| 162 | - path = params[:category_path].join('/') | |
| 162 | + path = params[:category_path] | |
| 163 | 163 | @category = environment.categories.find_by_path(path) | 
| 164 | 164 | if @category.nil? | 
| 165 | 165 | render_not_found(path) | ... | ... |