bullet
bullet copied to clipboard
Bullet > 8.0.0 doesn't work with Devise's authenticate_user! method
After upgrading to Bullet 8.0.1 and above (8.1 as well) I got the following error: wrong number of arguments (given 1, expected 0) for authenticate_user! method. The only solution, at the moment, is to disable Bullet entirely
@dmitrue Could you show me the full backtraces? I tried a repo with authenticate_user!, but I didn't see any problem.
@flyerhzm
/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/activerecord-8.1.0/lib/active_record/enum.rb:317:in 'block in define_enum_methods'
/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/activerecord-8.1.0/lib/active_record/relation.rb:565:in 'BasicObject#instance_exec'
/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/activerecord-8.1.0/lib/active_record/relation.rb:565:in 'block in ActiveRecord::Relation#_exec_scope'
/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/activerecord-8.1.0/lib/active_record/relation.rb:1391:in 'ActiveRecord::Relation#_scoping'
/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/activerecord-8.1.0/lib/active_record/relation.rb:565:in 'ActiveRecord::Relation#_exec_scope'
/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/activerecord-8.1.0/lib/active_record/scoping/named.rb:175:in 'block in Guest.scope'
/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/bullet-8.1.0/lib/bullet/ext/object.rb:20:in 'bullet_primary_key_value'
/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/bullet-8.1.0/lib/bullet/detector/n_plus_one_query.rb:61:in 'Bullet::Detector::NPlusOneQuery.add_impossible_object'
/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/bullet-8.1.0/lib/bullet/active_record81.rb:8:in 'block in Bullet::SaveWithBulletSupport#_create_record'
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.