test case to prevent duplicated associations with custom PK. #9397

Merged
merged 1 commit into from Feb 24, 2013

Conversation

Projects
None yet
2 participants
@senny
Member

senny commented Feb 24, 2013

This is only a test-case to prevent regressions for the issue #9201. I think we should include it in rails master where it's already fixed to make sure we don't run into the same problem again.

I would be willing to backport the fix to 3-2-stable but I have no idea what commit actually fixed it. I tried to bisect but was with no luck because I could not get bundle to work on most commits (renamed gems, missing gems, etc...).

@senny

This comment has been minimized.

Show comment Hide comment
@senny

senny Feb 24, 2013

Member

@rafaelfranca @carlosantoniodasilva could you take a look?

Member

senny commented Feb 24, 2013

@rafaelfranca @carlosantoniodasilva could you take a look?

@rafaelfranca

View changes

activerecord/test/cases/associations/has_many_associations_test.rb
+ assert_equal 1, speedometer.minivans.to_a.size, "Only one association should be present:\n#{speedometer.minivans.to_a}"
+ assert_equal 1, speedometer.reload.minivans.to_a.size
+ end
+

This comment has been minimized.

Show comment Hide comment
@rafaelfranca

rafaelfranca Feb 24, 2013

Owner

Remove this blank line please

@rafaelfranca

rafaelfranca Feb 24, 2013

Owner

Remove this blank line please

@senny

This comment has been minimized.

Show comment Hide comment
@senny

senny Feb 24, 2013

Member

@rafaelfranca blank line is removed...

Member

senny commented Feb 24, 2013

@rafaelfranca blank line is removed...

rafaelfranca added a commit that referenced this pull request Feb 24, 2013

Merge pull request #9397 from senny/9201_duplicate_associations_with_…
…natural_key

test case to prevent duplicated associations with custom PK.

@rafaelfranca rafaelfranca merged commit 83a9efb into rails:master Feb 24, 2013

@rafaelfranca

This comment has been minimized.

Show comment Hide comment
@rafaelfranca

rafaelfranca Feb 24, 2013

Owner

❤️ 💚 💙 💛 💜

Owner

rafaelfranca commented Feb 24, 2013

❤️ 💚 💙 💛 💜

@senny senny deleted the senny:9201_duplicate_associations_with_natural_key branch Feb 24, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment