Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

accepts_nested_attributes_for :reject_if option not honored for has_one associations

#1912

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.

Reported by pete_lacey · February 8th, 2009 @ 02:19 PM

State: resolved
Milestone: 2.x
Assigned to: Eloy Duran Eloy Duran
Importance: none

Activity

  1. Eloy Duran
    Eloy Duran

    This should be fixed in the patch attached to: http://rails.lighthouseapp.com/p...

    February 9th, 2009 @ 09:29 AM

  2. pete_lacey
    pete_lacey

    Just to let people know, the patch does resolve this issue. Thanks!

    February 11th, 2009 @ 06:42 PM

  3. Eloy Duran
    Eloy Duran
    • State changed from new to resolved
    • Assigned user set to Eloy Duran

    February 17th, 2009 @ 08:34 AM

  4. Dave Myron
    Dave Myron
    • 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?

    January 10th, 2011 @ 12:09 PM

  5. Eloy Duran
    Eloy Duran

    @Dave, adding a failing test case against the ActiveRecord test suite will make it much easier for others to confirm and/or fix.

    January 10th, 2011 @ 12:43 PM