Mercurial > hg > soundsoftware-site
diff app/controllers/my_controller.rb @ 1298:4f746d8966dd redmine_2.3_integration
Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author | Chris Cannam |
---|---|
date | Fri, 14 Jun 2013 09:28:30 +0100 |
parents | 0a574315af3e 622f24f53b42 |
children |
line wrap: on
line diff
--- a/app/controllers/my_controller.rb Fri Jun 14 09:07:32 2013 +0100 +++ b/app/controllers/my_controller.rb Fri Jun 14 09:28:30 2013 +0100 @@ -1,5 +1,5 @@ # Redmine - project management software -# Copyright (C) 2006-2012 Jean-Philippe Lang +# Copyright (C) 2006-2013 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -94,7 +94,7 @@ @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 @@ -104,7 +104,7 @@ def destroy @user = User.current unless @user.own_account_deletable? - redirect_to :action => 'account' + redirect_to my_account_path return end @@ -123,7 +123,7 @@ @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? @@ -131,7 +131,7 @@ @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) @@ -149,7 +149,7 @@ 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 @@ -162,7 +162,7 @@ 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 @@ -192,7 +192,7 @@ @user.pref[:my_page_layout] = layout @user.pref.save end - redirect_to :action => 'page_layout' + redirect_to my_page_layout_path end # Remove a block to user's page @@ -205,7 +205,7 @@ %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