-
-
Notifications
You must be signed in to change notification settings - Fork 592
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
friendly_id breaks ActiveRecord::Base.belongs_to_required_by_default in Rails 5.0.0 #730
Comments
As a temporary fix, you can replace |
Hi, @nflorentin! Sounds weird, because, as I know, |
@kimrgrey from Rails issue referenced above:
You may close this one |
So why was this issue closed? Is there no way FriendlyId can prevent this from happening? |
I agree with @juampi, that this issue is not resolved and friendly_id should be modified to adapt for this and thus the issue shouldn't be considered closed |
Here an example of a similar issue addressed for devise heartcombo/devise@c2c74b0 |
@nflorentin great, thanks for linking. Let me try If I can apply this to friendly_id too and submit a PR :) |
Any luck on this? |
The issue is still there in version 5.4.2. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
In Rails 5.0.0, a new config was introduced to activate deactivate the automatic presence validation on belongs_to associations.
In config/active_record_belongs_to_required_by_default.rb:
Rails.application.config.active_record.belongs_to_required_by_default = true
Without friendly_id in gemfile
After adding friendly_id in gemfile
In rails console:
The text was updated successfully, but these errors were encountered: