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

[ci skip] Fix the API docs for Bi-directional associations #20542

Merged
merged 1 commit into from
Jun 13, 2015

Conversation

repinel
Copy link
Member

@repinel repinel commented Jun 13, 2015

The examples now take in consideration when Active Record finds inverse
associations automatically
.

Fix #20528

@@ -955,35 +955,53 @@ def association_instance_set(name, association)
# The +traps+ association on +Dungeon+ and the +dungeon+ association on +Trap+ are
# the inverse of each other and the inverse of the +dungeon+ association on +EvilWizard+
# is the +evil_wizard+ association on +Dungeon+ (and vice-versa). By default,
# Active Record doesn't know anything about these inverse relationships and so no object
# loading optimization is possible. For example:
# Active Record uses an automatic guessing of the inverse association based on the name
Copy link
Member

Choose a reason for hiding this comment

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

"Active Record can guess the inverse of the association based on the name.."

@repinel repinel force-pushed the fix-bi-directional-assoc-doc branch from ad3757b to 060bc1d Compare June 13, 2015 13:37
The examples now take in consideration when Active Record finds inverse
associations automatically.
@repinel repinel force-pushed the fix-bi-directional-assoc-doc branch from 060bc1d to 55703f9 Compare June 13, 2015 13:38
@repinel
Copy link
Member Author

repinel commented Jun 13, 2015

@zzak Thanks for the feedback!

I shrunk the changes to avoid over complicating the docs. I still have the example in a similar way, so let me know if it's clear.

@zzak
Copy link
Member

zzak commented Jun 13, 2015

@repinel This is much more clear, thank you!!

zzak pushed a commit that referenced this pull request Jun 13, 2015
[ci skip] Fix the API docs for Bi-directional associations
@zzak zzak merged commit dfc9269 into rails:master Jun 13, 2015
@repinel
Copy link
Member Author

repinel commented Jun 13, 2015

Thanks ❤️

@repinel repinel deleted the fix-bi-directional-assoc-doc branch June 14, 2015 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants