Pārlūkot izejas kodu

Set preferences with #safe_attributes=.

git-svn-id: http://svn.redmine.org/redmine/trunk@15728 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/3.4.0
Jean-Philippe Lang pirms 8 gadiem
vecāks
revīzija
fcec4d0975
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1
    1
      app/controllers/users_controller.rb

+ 1
- 1
app/controllers/users_controller.rb Parādīt failu

@@ -132,7 +132,7 @@ class UsersController < ApplicationController
# Was the account actived ? (do it before User#save clears the change)
was_activated = (@user.status_change == [User::STATUS_REGISTERED, User::STATUS_ACTIVE])
# TODO: Similar to My#account
@user.pref.attributes = params[:pref] if params[:pref]
@user.pref.safe_attributes = params[:pref]

if @user.save
@user.pref.save

Notiek ielāde…
Atcelt
Saglabāt