-
-
Notifications
You must be signed in to change notification settings - Fork 911
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
Add optional(false)
support to belong_to
#1237
Add optional(false)
support to belong_to
#1237
Conversation
Oh nice! I just did a quick pass of this and it looks good but I will take a closer look soon. |
Hurray! 🎉 Our app has |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, looks good! Merge at will 👍
Thanks for your PR This will also be usefull for conditional optional in Rails 5: |
### Features * Add support for `optional: false` in `belongs_to` associations. ([#1237]) * Add support for associations with `inverse_of: false` and non-standard foreign key ([#1106]) ### Bug fixes * Fix typos in documentation of `allow_values` ([#1241]) * Fix appraisal command in CONTRIBUTING.md file ([#1253]) ### Improvements * Remove minitest reporters dependency ([#1251]) * Development dependency updates [#1106]: #1106 [#1237]: #1237 [#1241]: #1241 [#1253]: #1253
Allows
belongs_to
associations withoptional: false
to be tested with
It also adds support for
optional(true)
which is the same as justoptional
.Fixes #1219