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.

Behavior of child_ids= setter in has_many :through :uniq associations

#2635

Problem is mocked out here: http://pastie.org/474876

To me this does not seem to be the expected behavior of the setter with the uniq option set to false. If I am incorrect and this ticket is closed could the reasoning be explained?

Reported by Kunal Shah · May 11th, 2009 @ 10:08 PM

State: stale
Milestone: 3.x
Assigned to: nobody
Importance: none

Activity

  1. Frederick Cheung
    Frederick Cheung

    Well I don't thing rails is doing this on purpose - it's basically doing

    
      foos << Foo.find(ids)
    

    and find uniques the ids (ie it's not the association code that does this the uniquing just a (perhaps unintended) consequence of using find in this way.

    May 12th, 2009 @ 02:44 PM

  2. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.x to 3.x

    May 4th, 2010 @ 06:48 PM

  3. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to stale
    • Importance changed from to

    Marking ticket as stale. If this is still an issue please leave a comment with suggested changes, creating a patch with tests, rebasing an existing patch or just confirming the issue on a latest release or master/branches.

    October 9th, 2010 @ 04:15 AM