diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-11 19:39:47 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-11 19:39:47 +0000 |
commit | 8ab9215ea8df2216ccfacf272804811b05ab82c8 (patch) | |
tree | ac9ab871a1f9fc1a190cd6505ee08e8efacf8863 /app/controllers/my_controller.rb | |
parent | 60d06d8c17290f536cf76ffd4a75bdafe540aa9a (diff) | |
download | redmine-8ab9215ea8df2216ccfacf272804811b05ab82c8.tar.gz redmine-8ab9215ea8df2216ccfacf272804811b05ab82c8.zip |
Use named routes in controllers.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10983 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/my_controller.rb')
-rw-r--r-- | app/controllers/my_controller.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index b2c2a9dc7..9ee82c054 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -59,7 +59,7 @@ class MyController < ApplicationController @user.notified_project_ids = (@user.mail_notification == 'selected' ? params[:notified_project_ids] : []) set_language_if_valid @user.language flash[:notice] = l(:notice_account_updated) - redirect_to :action => 'account' + redirect_to my_account_path return end end @@ -69,7 +69,7 @@ class MyController < ApplicationController def destroy @user = User.current unless @user.own_account_deletable? - redirect_to :action => 'account' + redirect_to my_account_path return end @@ -88,7 +88,7 @@ class MyController < ApplicationController @user = User.current unless @user.change_password_allowed? flash[:error] = l(:notice_can_t_change_password) - redirect_to :action => 'account' + redirect_to my_account_path return end if request.post? @@ -96,7 +96,7 @@ class MyController < ApplicationController @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation] if @user.save flash[:notice] = l(:notice_account_password_updated) - redirect_to :action => 'account' + redirect_to my_account_path end else flash[:error] = l(:notice_account_wrong_password) @@ -114,7 +114,7 @@ class MyController < ApplicationController User.current.rss_key flash[:notice] = l(:notice_feeds_access_key_reseted) end - redirect_to :action => 'account' + redirect_to my_account_path end # Create a new API key @@ -127,7 +127,7 @@ class MyController < ApplicationController User.current.api_key flash[:notice] = l(:notice_api_access_key_reseted) end - redirect_to :action => 'account' + redirect_to my_account_path end # User's page layout configuration @@ -156,7 +156,7 @@ class MyController < ApplicationController layout['top'].unshift block @user.pref[:my_page_layout] = layout @user.pref.save - redirect_to :action => 'page_layout' + redirect_to my_page_layout_path end # Remove a block to user's page @@ -169,7 +169,7 @@ class MyController < ApplicationController %w(top left right).each {|f| (layout[f] ||= []).delete block } @user.pref[:my_page_layout] = layout @user.pref.save - redirect_to :action => 'page_layout' + redirect_to my_page_layout_path end # Change blocks order on user's page |