diff app/controllers/my_controller.rb @ 1295:622f24f53b42 redmine-2.3

Update to Redmine SVN revision 11972 on 2.3-stable branch
author Chris Cannam
date Fri, 14 Jun 2013 09:02:21 +0100
parents 3e4c3460b6ca
children 4f746d8966dd
line wrap: on
line diff
--- a/app/controllers/my_controller.rb	Fri Jun 14 09:01:12 2013 +0100
+++ b/app/controllers/my_controller.rb	Fri Jun 14 09:02:21 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
@@ -59,7 +59,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
@@ -69,7 +69,7 @@
   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 @@
     @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 @@
         @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 @@
       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 @@
       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
@@ -157,7 +157,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
@@ -170,7 +170,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