In some cases, one may not want to save attributes retrieved from a form
to the database right away. Would the best way to bulk update your AR
object from the params hash be to do:
is all you need. The only attributes set are those named
by keys in the params hash.
Shouldn't you merge the keys, given the possibility that your object may have an unsaved attribute set already (that you want to keep) that is not represented in your params hash. Using = will blow away those attributes, but merge! will preserve them.
No, the attributes= method does not assign a new attribute hash.
It just assigns new values to the attributes (and attr_accessors)
keyed in the RHS hash.