Commit 41f821e8133d3a8bb9066373fb6ccfa88d34516e
1 parent
0bb637b2
Exists in
master
and in
20 other branches
rails4: fix more redirect_to params error
Showing
3 changed files
with
3 additions
and
3 deletions
Show diff stats
app/controllers/my_profile/profile_editor_controller.rb
@@ -80,7 +80,7 @@ class ProfileEditorController < MyProfileController | @@ -80,7 +80,7 @@ class ProfileEditorController < MyProfileController | ||
80 | if @profile.destroy | 80 | if @profile.destroy |
81 | session[:notice] = _('The profile was deleted.') | 81 | session[:notice] = _('The profile was deleted.') |
82 | if(params[:return_to]) | 82 | if(params[:return_to]) |
83 | - redirect_to params[:return_to] | 83 | + redirect_to url_for(params[:return_to]) |
84 | else | 84 | else |
85 | redirect_to :controller => 'home' | 85 | redirect_to :controller => 'home' |
86 | end | 86 | end |
app/controllers/public/account_controller.rb
@@ -426,7 +426,7 @@ class AccountController < ApplicationController | @@ -426,7 +426,7 @@ class AccountController < ApplicationController | ||
426 | 426 | ||
427 | def go_to_initial_page | 427 | def go_to_initial_page |
428 | if params[:return_to] | 428 | if params[:return_to] |
429 | - redirect_to params[:return_to] | 429 | + redirect_to url_for(params[:return_to]) |
430 | elsif environment.enabled?('allow_change_of_redirection_after_login') | 430 | elsif environment.enabled?('allow_change_of_redirection_after_login') |
431 | check_redirection_options(user, user.preferred_login_redirection, user.admin_url) | 431 | check_redirection_options(user, user.preferred_login_redirection, user.admin_url) |
432 | else | 432 | else |
app/controllers/public/search_controller.rb
@@ -14,7 +14,7 @@ class SearchController < PublicController | @@ -14,7 +14,7 @@ class SearchController < PublicController | ||
14 | # Backwards compatibility with old URLs | 14 | # Backwards compatibility with old URLs |
15 | def redirect_asset_param | 15 | def redirect_asset_param |
16 | return unless params.has_key?(:asset) | 16 | return unless params.has_key?(:asset) |
17 | - redirect_to params.merge(:action => params.delete(:asset)) | 17 | + redirect_to url_for(params.merge action: params.delete(:asset)) |
18 | end | 18 | end |
19 | 19 | ||
20 | no_design_blocks | 20 | no_design_blocks |