From 7476b90e164ec62aa4719fa8398fb8464c0e453e Mon Sep 17 00:00:00 2001 From: George Millo Date: Tue, 23 Dec 2014 10:18:02 +0000 Subject: Add information about "allow_destroy" requiring an ID. [ci skip] I just wasted an absurd amount of time trying to figure out why my model wasn't being deleted even though I was setting `_destroy` to true like the instructions said. Making the documentation a little bit clear so that someone like me doesn't waste their time in future. --- activerecord/lib/active_record/nested_attributes.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/nested_attributes.rb b/activerecord/lib/active_record/nested_attributes.rb index 8a2a06f2ca..0f9b52f69f 100644 --- a/activerecord/lib/active_record/nested_attributes.rb +++ b/activerecord/lib/active_record/nested_attributes.rb @@ -81,6 +81,9 @@ module ActiveRecord # # Note that the model will _not_ be destroyed until the parent is saved. # + # Also note that the model will not be destroyed unless you also specify + # its id in the updated hash. + # # === One-to-many # # Consider a member that has a number of posts: -- cgit v1.2.3