You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the upgrade, its necessary to add the optional option:
belongs_to :lecture, optional: true
Suggested addition to /guides/source/upgrading_ruby_on_rails.md:
Upgrading from Rails 5.0 to Rails 5.1
...
belongs_to associations are now automatically required: true
All model's belongs_to associations are now treated as if the required: true option is present. So if the association is optional, that must be declared, or validation will fail without the presence of the associated model record.