summaryrefslogtreecommitdiffstats
path: root/app/controllers/my_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-17 06:43:12 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-17 06:43:12 +0000
commit43d8ab8288e1d1f561d3fc530472ddb0042db5fe (patch)
tree9751cafb90b684cf955174b46e3514dc4efd8bd1 /app/controllers/my_controller.rb
parentcad0036297bdecc13bcd5cb66f439081ca2bae9f (diff)
downloadredmine-43d8ab8288e1d1f561d3fc530472ddb0042db5fe.tar.gz
redmine-43d8ab8288e1d1f561d3fc530472ddb0042db5fe.zip
Use safe_attributes for user preferences.
git-svn-id: http://svn.redmine.org/redmine/trunk@15688 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/my_controller.rb')
-rw-r--r--app/controllers/my_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb
index 6597fb245..73ac2222c 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -56,8 +56,8 @@ class MyController < ApplicationController
@user = User.current
@pref = @user.pref
if request.post?
- @user.safe_attributes = params[:user] if params[:user]
- @user.pref.attributes = params[:pref] if params[:pref]
+ @user.safe_attributes = params[:user]
+ @user.pref.safe_attributes = params[:pref]
if @user.save
@user.pref.save
set_language_if_valid @user.language