This project is archived and is in readonly mode.
Nested Attributes: _destroy should work independent of reject_if
-
Adam Lowe
plus 1
-
Johmas
+1
-
Shay Arnett
+1
-
Desi
+1
-
Tim Pope
- Tag changed from marked_for_destruction, nested_attributes_for, reject_if to marked_for_destruction, nested_attributes_for, reject_if, verified
This looks to be an unintended consequence of https://github.com/rails/rails/commit/097240f60215b866d24aebd02cc41... which was in response to #5579 Rails3 - accepts_nested_attributes_for reject_if option does not work.. The fix gets a +1 from me: It's just a single, self-explanatory line plus a test.
-
Neeraj Singh
- State changed from new to open
- Milestone set to 3.x
- Assigned user set to José Valim
- Importance changed from to Low
oops!!
did not see the impact with _destroy option.
+1
-
Sakchai Siripanyawuth
+1 having the same issue
-
Tim Brandes
+1
-
Dennis Rogenius
+1 just ran into this
-
Santiago Pastorino
Hey Durran I'm going to push your fix but can you rebase the patch. Doesn't apply cleanly anymore :(.
Thanks. -
Durran Jordan
I've attached the new patch which is rebased against current master.
-
Repository
- State changed from open to committed
(from [a9b4b5da7c216e4464eeb9dbd0a39ea258d64325]) Destroying records via nested attributes works independent of reject_if:
- When a :_destroy truthiness is provided in the attributes hash, the record should get destroyed regardless of the result of the proc or method supplied to :reject_if. (If :allow_destroy is true)
[#6006 Nested Attributes: _destroy should work independent of reject_if state:committed]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
https://github.com/rails/rails/commit/a9b4b5da7c216e4464eeb9dbd0a39... -
Santiago Pastorino
- State changed from committed to open
Hey Durran I've pushed it to master, now can you rebase it to apply on 3-0-stable?
-
Durran Jordan
Here's the patch against the 3-0-stable branch.
-
Repository
- State changed from open to committed
(from [30264bb57b0f54c5bdd7cd23d0a29b36879954a3]) Destroying records via nested attributes works independent of reject_if:
- When a :_destroy truthiness is provided in the attributes hash, the record should get destroyed regardless of the result of the proc or method supplied to :reject_if. (If :allow_destroy is true)
[#6006 Nested Attributes: _destroy should work independent of reject_if state:committed]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
https://github.com/rails/rails/commit/30264bb57b0f54c5bdd7cd23d0a29...
