Topic: MassAssignmentSecurity [SOLVED]

I am having a error when i am trying to do a update i get a message that reads

ActiveModel::MassAssignmentSecurity::Error in UsersController#update

Can't mass-assign protected attributes: current_password

my controller looks like

def update
    @user = User.find(params[:id])
    if @user.update_attributes(params[:user])
      flash[:success] = "User Updated"
      redirect_to @user
      render 'edit'

Last edited by moiseszaragoza (2012-06-07 16:47:20)

Re: MassAssignmentSecurity [SOLVED]

the problem is that i was thinking i was going threw device.
i removed the password fields that device uses and that helps.
I still need to test that the password are not being reset to nil or "" because there are not present