bullet icon indicating copy to clipboard operation
bullet copied to clipboard

Bullet > 8.0.0 doesn't work with Devise's authenticate_user! method

Open dmitrue opened this issue 4 months ago • 3 comments

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 avatar Oct 24 '25 03:10 dmitrue

@dmitrue Could you show me the full backtraces? I tried a repo with authenticate_user!, but I didn't see any problem.

flyerhzm avatar Oct 25 '25 08:10 flyerhzm

@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'

dmitrue avatar Oct 25 '25 08:10 dmitrue

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Nov 25 '25 02:11 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Dec 09 '25 02:12 github-actions[bot]