This project is archived and is in readonly mode.
accepts_nested_attributes_for '_delete' feature broken in Rails 2.3.8
-
Phil C
There is a deprecation warning in 2.3.5. Use destroy instead of delete in 2.3.8
-
Phil C
eg:
User.first.update_attributes(:addresses_attributes => {'0' => {:id => '1', :city => 'York', '_destroy' => '1'}}) -
Gacha
You'r right, it works. But I didn't see any warning when I used _delete option.
-
Timothy Jones
-
There was no deprecation warning in 2.3.5 that I ever saw.
-
The documentation still says "delete", not "destroy".
-
Something like this should have been in the release notes for 2.3.6-2.3.8.
-
-
Alex Rice
Can someone point me at the deprecation warning, or what exactly happened here? Unclear if this applies to nested attributes, or the delete method in general. I also got bit by this in my 2.3.8 upgrade. Thanks
-
José Valim
- State changed from new to invalid
Timothy, I remember we did have a deprecation warning on 2.3.5 but I completely agree with you that we should fix the documentation and it should have been included in the release notes.
That said, could someone please fix the documentation in the required places? You can push directly to github.com/lifo/docrails (everyone has commit access). Thanks very much!
-
Kevin Menard
- Importance changed from to Low
There was definitely no deprecation message in 2.3.5 and we shouldn't be removing things we deprecate in one point release and then remove it in the next point release. It defies all release management convention.