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

Use optional: true for optional belongs_to associations #1441

Merged
merged 4 commits into from
May 14, 2018

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented May 14, 2018

  • Using required: false for optional belongs_to associations is deprecated in Rails 5 and will be removed in Rails 6.
  • Also required: true is the new default in Rails 5.
  • Setting inverse_of to required belongs_to associations is recommended to avoid extra DB queries.
  • Using be_success in controller tests is deprectated in favor of be_successful.

@tvdeyen tvdeyen added this to the 4.1 milestone May 14, 2018
@tvdeyen tvdeyen merged commit d86a655 into AlchemyCMS:master May 14, 2018
@tvdeyen tvdeyen deleted the belongs_to-optional branch May 14, 2018 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant