[Rails] Re: Using update_attributes(params[:something]) w/ manual assignment
On May 27, 10:55 pm, Jose Ambros-ingerson <li...@ruby-forum.com>
wrote:
> Perry Smith wrote:
>
> > By the way, update_attributes calls save (as of 2.3.2? or was it before
> > that) only if at least one attribute has changed.
>
> It appears to me that this is not true. I tried it below using 2.3.5.
> As you can see the 'locale' attribute was "es" and it got updated to
> "es" anyway. Did I get this wrong?
Actually that bit in the logs show the name getting set to spanish as
well. It's also possible that you've turned off this behaviour -
ActiveRecord::Base.partial_updates (or something along those lines)
controls whether this is enabled if my memory is correct
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home