This project is archived and is in readonly mode.
accepts_nested_attributes_for :reject_if option not honored for has_one associations
Reported by pete_lacey | February 8th, 2009 @ 02:19 PM | in 2.x
Maybe this is intentional, but it seems that the :reject_if option of the accepts_nested_attributes_for macro does not work for has_one (and belongs_to ?) associations.
Comments and changes to this ticket
-
Eloy Duran February 9th, 2009 @ 09:29 AM
This should be fixed in the patch attached to: http://rails.lighthouseapp.com/p...
-
pete_lacey February 11th, 2009 @ 06:42 PM
Just to let people know, the patch does resolve this issue. Thanks!
-
Eloy Duran February 17th, 2009 @ 08:34 AM
- State changed from new to resolved
- Assigned user set to Eloy Duran
-
Dave Myron January 10th, 2011 @ 12:09 PM
- Importance changed from to
Resurrecting an old one. This appears to have regressed somewhere after Feb 11th, 2009 when pete_lacey said the linked-to patch resolves the issue. I'm on Rails 3.0.3 and the :reject_if proc on an accepts_nested_attributes_for call for a has_one association is never run.
Can anyone confirm this?
-
Eloy Duran January 10th, 2011 @ 12:43 PM
@Dave, adding a failing test case against the ActiveRecord test suite will make it much easier for others to confirm and/or fix.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>