This project is archived and is in readonly mode.
AssociationCollection's destroy method is not compatible with old version
-
Anthony Eden
I'm seeing the same issue. Is there documentation somewhere about the deprecation of collection.destroy(id) because I see that it is not in the latest API docs (maybe it was never there in the first place?) Alternatively is there a fix?
-
CancelProfileIsBroken
- Tag set to bugmash
-
Josh Nichols
- Tag changed from bugmash to bugmash, verified
Verified this occurring 2-3-stable. I'd +1 adding back support for destroy(id), and if appropriate, adding a deprecation warning.
-
Josh Nichols
Attached a patch with a failing test case.
-
Josh Nichols
Attached a patch with a working implementation.
-
Dan Pickett
+1 verified
latest patch applies cleanly to master and tests behavior adequately
-
Elad Meidar
+1 Verified, +1 on the catch, i am usually using delete since i almost never REALLY destroy data in my applications.
+1 patch applies to 2-3-stable and master, all tests pass.
Tested also on a mini app, included some extra #delete manual tests to assure that method is working well, and it does.
-
Dan Croak
+1 verified Josh's patch applies to 2-3-stable and tests run green.
I have attached a patch that alters his implementation to check ActiveRecord::Base instead of String and Integer. This better reveals the intent, in my opinion, of the conditional.
It should apply cleanly after applying his 2306-destroy_association_by_id.patch
-
Repository
(from [29a5549b3408597f3d3eb17350737631368c6cc9]) Added back support for destroying an association's object by id. [#2306 AssociationCollection's destroy method is not compatible with old version status:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/29a5549b3408597f3d3eb173507376... -
Repository
(from [0ec64bea9293dd21588359da80bb43b82886cf2c]) Added back support for destroying an association's object by id. [#2306 AssociationCollection's destroy method is not compatible with old version status:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/0ec64bea9293dd21588359da80bb43... -
José Valim
- State changed from new to resolved
- Tag changed from bugmash, verified to verified
