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
Rails 5 belongs_to_required_by_default not working #27844
Comments
http://stackoverflow.com/a/41367484/2357117 I think TestApp does not take care of |
The problem is that |
@rafaelfranca I retried test after moving TestApp class declaration up to right above |
Any suggestions to make the above test pass? slim-rails These are the additional gems I use for my app (I didn't mention gems for testing, e.g. capybara, poltergeist etc, as I believe they are not the culprit.) |
I'd take a look at |
Ok thanks. |
I did a test today and as you can see, |
If anyone else is having this same issue, I "fixed" it by removing the Really, this fixes the symptom rather than the problem - I'm not sure what's causing the initializer to not be loaded probably; it's probably one of my gems. But the above hack is good enough for now. |
NOTE: this setting is not currently taking effect since it appears that govuk_notify_rails is causing early rails loading and causing it to be "lost". This is a workaround for issue rails/rails#39855 (comment) suggested by this issue comment rails/rails#37030 (comment) and this activerecord specific issue rails/rails#27844
Steps to reproduce
Expected behavior
Test should have passed.
Actual behavior
Test fails.
System configuration
Rails version: 5.0.1
Ruby version: 2.4.0p0
The text was updated successfully, but these errors were encountered: