On Jun 9, 10:05 pm, Perry Smith <[email protected]>
wrote:
> I don't see the "multiple" calls to save.
>
> update_attributes will call save but I don't see the other call to save.
>
> 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.

Actually it's save which is a no-op if no attributes has saved (this
was part of 2.1).

you can do @car.attributes = params[:car] which will do all the
attribute setting that update_attributes does but doesn't call save.
If you are (and rightly so) worried about what users submitting
attributes you don't want them to, take a look at attr_protected/
attr_accessible

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=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to