On Nov 22, 2:46 am, João Pereira <[email protected]> wrote:
> user_id =params[:id]
> @user = User.find(user_id)
> @user.update_attributes!(:active=>1)
>
> and in the model I don't have the param active :marked as attr_accessible.
> And the following warning messages is logged and the record is not updated
>
> WARNING: Can't mass-assign these protected attributes: active
>
> Shouldn't this work without having the :param active marked with
> attr_accessible?

No - update_attributes, new etc. all behave the same way with respect
to protected attributes.

Fred

--

You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=.


Reply via email to