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

Remove required: true from the model generator template #35977

Merged

Conversation

prathamesh-sonpatki
Copy link
Member

Summary

belongs_to association have required: true by default
#18937 onwards so we don't need it
in the generator template.
We still need the code for required in the command line generator as
it adds null: false in the migration.

`belongs_to` association have `required: true` by default
rails#18937 onwards so we don't need it
in the generator template.
We still need the code for required in the command line generator as
it adds `null: false` in the migration.
@prathamesh-sonpatki
Copy link
Member Author

Should null: false be added by default for belongs_to associations?

@rafaelfranca
Copy link
Member

Should null: false be added by default for belongs_to associations?

I think so.

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.

None yet

3 participants