Remove `required: true` from the model generator template
`belongs_to` association have `required: true` by default https://github.com/rails/rails/pull/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.
Showing
想要评论请 注册 或 登录