This project is archived and is in readonly mode.
has_many through append to collection should have duplicates before reload
-
chris (at thredup)
Attaching has_many_through_associations_test.rb with a case I added to show this behavior.
My added case is line 67
activerecord/test/cases/associations/has_many_through_associations_test.rb -
chris (at thredup)
Updated test.
-
chris (at thredup)
My first stab at fixing this is now pushed to my fork.
The problem is that my fix now causes problems for nested_attributes - two tests in there are now failing.
The commit is here: https://github.com/thredup/rails/commit/df912531295e3e57314b00ef811...
Any input from people that know the code base better than I would be awesome.
-
chris (at thredup)
Committed some files by mistake - fixed and re-pushed: https://github.com/thredup/rails/commit/ad0b5421e8e4893924ff70a97dd...
-
chris (at thredup)
- Title changed from has_many through collection bug to has_many through append to collection should have duplicates before reload
-
Jon Leighton
- Assigned user set to Aaron Patterson
- Tag changed from rail3 has_many, has_many_through to rail3 has_many, has_many_through, patch
- Importance changed from to Low
Hi Chris,
Thanks for the bug report. I've created a patch which I'll hopefully get Aaron to merge at some point.
Cheers,
Jon -
Jon Leighton
- State changed from new to open
-
Repository
- State changed from open to resolved
(from [ff7bde62c857ec94f45a5be3bc76468deb8b0b3a]) When a has_many association is not :uniq, appending the same record multiple times should append it to the @target multiple times [#5964 has_many through append to collection should have duplicates before reload state:resolved] https://github.com/rails/rails/commit/ff7bde62c857ec94f45a5be3bc764...
