-
Notifications
You must be signed in to change notification settings - Fork 240
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
active_record.belongs_to_required_by_default functionality is disabled/overridden #297
Comments
Hi @mattscilipoti, Thanks for the report, I see no obvious reason of why this would occur but I'll think about it and let you know if I think of something. Anyone else, please comment here, ideas are welcome! Hopefully it's something we can get to understand properly : ) |
I tried tracing this back. The issue existed when Rails 5 support was added in SHA: 3834199. |
I found a similar issue in acts_as_list (brendon/acts_as_list#268). The workaround I used here didn't work. I was able to trace it to a specific commit in that project, but I haven't identified the cause. |
Mmm, I'm sorry I missed your update @mattscilipoti. It sounds like something in the Simple Token Authentication dependencies changed that the acts as pattern depends on, I've no idea at this point what it could be. Did you find out more eventually? |
The Problem
After installing 'simple_token_authentication', tests, that ensure belongs_to associations are required, now fail (presence is required by default in Rails 5). I tried removing each change and it occurs once the gem is required in the Gemfile.
The Cause
I haven't nailed down the cause, but I have found a workaround...
A Workaround
require :false
for simple_token_authentication.require 'simple_token_authentication
before its first use. For me, that is inconfig/initializers/simple_token_authentication.rb
The Nitty Gritty
Anyone have any ideas?
The text was updated successfully, but these errors were encountered: