Contrived Model:
class Hobby
field :name
belongs_to :person
end
class Person
has_many :hobbies
accepts_nested_attributes_for :hobbies
end
Scenario:
I have a form that allows a user to add multiple hobby objects by calling #update_attributes on the retrieved person object to do this. How do I ascertain what new Hobby objects were added by my call to #update_attributes? Is there a helper which identifies these new objects in the person.hobbies Proxy? A use case (not mine, but proves the usefulness) would be to show a flash message saying "Added Hobby X and Hobby Y as Hobbies".