This is mass assignment:
User.new(params[:user])
Basically assigning all the attributes to the an instance based on the
params[:user] hash.
--
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 rubyonrail
Thanks - what's mass assignment? Assigning attributes to an object?
--
Posted via http://www.ruby-forum.com/.
--
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 rubyonrails-talk@googlegroups.com.
To un
On Mar 7, 4:45 pm, Gaba Luschi wrote:
> Hi,
>
> What's the difference between attr_accessor and attr_accessible?
>
They're completely unrelated. attr_accessor is a pure ruby method and
creates a setter & getter method for an instance variable.
attr_accessible (and its counterpart attr_protected
3 matches
Mail list logo