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.

find_or_create_by_x with create params via association broke in 2.3.9

#5737

Sorry about opening this bug - I'd prefer to re-open #1108 but I don't know how to do that.

The fix to #1108 added two new bugs.

Commit fad166c15277c72b370c90e890d509d0f6c9af63 (i.e. 2.3.9) broke find_or_create_by_x with additional parameters for the create, when called through an association. Since http://dev.rubyonrails.org/ticket/7368 you've been able to pass additional parameters that are ignored by the find but used by the create. fad166c broke that behavior.

fad166c also broke find_or_create_by_x with a block provided. It used to yield to the block but it doesn't anymore.

For more info please see my comments to #1108.

For convenience I'll attach the patch to this report, too.

Reported by toby cabot · September 29th, 2010 @ 09:39 PM

State: resolved
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. David Trasbo
    David Trasbo
    • State changed from new to duplicate
    • Importance changed from to Low

    I've reopened #1108. Please continue the discussion there.

    October 10th, 2010 @ 04:54 PM

  2. toby cabot
    toby cabot

    Aaron Patterson committed the fix to #1108 so this ticket can be closed.

    October 21st, 2010 @ 12:32 PM

  3. David Trasbo
    David Trasbo
    • State changed from duplicate to resolved

    October 21st, 2010 @ 12:34 PM