Update attributes just calls attributes=, which just calls the setter methods corresponding to the args hash keys. Thus, the way to do what you're looking for is to delete the hash keys you don't want.
But for updating a subrecord instead, you could just call update_attributes on the subrecord instead of the main record. On May 16, 8:31 pm, mrmanishs <[email protected]> wrote: > I have a situation where I only want to update the object, but not the > nested attributes. Is there a way to tell Rails to only call > update_attributes on the main object? I also have a situation where I > only wanted to update certain nested attributes, but not the main > object (i.e. one of the subobject attributes of the main object). > > Thanks. > > -- > 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 > athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- 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.

