Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A fix for issue #1360 #1389

merged 0 commits into from May 31, 2011

A fix for issue #1360 #1389

merged 0 commits into from May 31, 2011


Copy link

farleyknight commented May 29, 2011


I took a look at issue #1360 and found out what the problem was. It seems that the latest refactoring of collection_association.rb used both create and save! to perform a create!. This caused the double-callbacks to be triggered.

The patch is essentially an unrefactoring of create! to mimic what create currently does. I had to add in an extra parameter to insert_record to use either save or save!.

I wrote a simple test to check if the callbacks were getting called more than once. It should capture the problem that was found in issue #1360.

As it stands, there are 7 other tests that are failing, but they seem to be existing problems, as ever time I've cloned I get the same 7 failures. And my modifications don't seem to change the results of those failures, so I'm fairly certain they are unrelated.

Thanks for taking a look,

  • Farley
@farleyknight farleyknight merged commit 18b153d into rails:master May 31, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.