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

Fix for activerecord join dependency instantiate bug #19938

Merged
merged 1 commit into from
Oct 20, 2015
Merged

Fix for activerecord join dependency instantiate bug #19938

merged 1 commit into from
Oct 20, 2015

Conversation

meinac
Copy link
Contributor

@meinac meinac commented Apr 28, 2015

This fix closes #19896

@rafaelfranca
Copy link
Member

Could you add a test case that assets the new behavior?

@meinac
Copy link
Contributor Author

meinac commented May 4, 2015

@rafaelfranca I've created a test case for testing the behaviour. By the way, data model of the original issue is wrong to me but even if the data model is wrong rails should handle relations correctly so this patch does this.

@@ -0,0 +1,5 @@
class Mentor < ActiveRecord::Base

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✂️

use only object_id instead parent class and parent id

test cases

assert_equal

use table name in references

fix minor problems
@meinac
Copy link
Contributor Author

meinac commented May 4, 2015

@rafaelfranca thanks for your response, I've fixed minor problems.

@meinac
Copy link
Contributor Author

meinac commented May 25, 2015

@rafaelfranca did you have a chance to look into this?

@sgrif sgrif merged commit df94dab into rails:master Oct 20, 2015
sgrif added a commit that referenced this pull request Oct 20, 2015
This is a separate commit, as it is not just a changelog conflict. Want
to point out the changes in the code
sgrif added a commit that referenced this pull request Oct 20, 2015
Fix for activerecord join dependency instantiate bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Child records not properly loaded when accessible through multiple association paths
3 participants