-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
No longer generate belongs_to relationships when using references in the new generators #2151
Comments
I think this is the way to go, but I would continue to generate the belongs_to provided the context already exists and the assoc'd schema lives inside it. Yay/nay? |
@chrismccord it is slightly tricky to detect but we can try. The problem is that users in the past were used to write:
But now they need to write:
So we need to figure out if the underscored context is a prefix of "blog_posts". It is definitely possible but it looks iffy. |
ah I see. 👍 to not generating belongs_to for now |
Fixed in master. |
Specifying |
Was confused a lot by missing |
Because there is a higher chance we will get the wrong module name now and because we may end-up accidentally pushing developers to have associations across contexts.
@chrismccord, what do you think?
The text was updated successfully, but these errors were encountered: