According to the documentation for NestedAttributes<http://api.rubyonrails.org/classes/ActiveRecord/NestedAttributes/ClassMethods.html>, when you have an associated model that is marked for destruction and you call save on the parent it should not be required to call reload in order to see that change reflected on the object's association in memory (it's at the end of the One-to-many section).
However, the documentation for AutosaveAssociation<http://api.rubyonrails.org/classes/ActiveRecord/AutosaveAssociation.html>contradicts; showing that it is required to call reload in order to see the change to the association (see the One-to-many Example). My feeling is that this is a documentation error in NestedAttributes since the real behavior is that you do have to call reload. Although, it would be nicer if users did not have to remember to call reload as that would go along with the principle of least surprise. If someone can confirm a documentation change is appropriate I will go ahead and submit a patch to docrails. Rob Olson --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" 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-core?hl=en -~----------~----~----~----~------~----~------~--~---
