flyerhzm/bullet

add_safelist ignored

josegrad opened this issue · 1 comments

I have the next configuration in development.rb

Ruby 2.5.9
Rails 5.1.7
Mongoid 7.2.1

Rails.application.configure do
  config.after_initialize do
    Bullet.enable        = true
    Bullet.alert         = true
    Bullet.bullet_logger = true
    Bullet.console       = true
    Bullet.rails_logger  = true
    Bullet.add_footer    = true

    Bullet.add_safelist :type => :unused_eager_loading, :class_name => "Company", :association => :shipments
  end

...

But is still see:

USE eager loading detected
   Company => [:shipments]
   Add to your query: .includes([:shipments])

@josegrad pretty sure that 'eager loading detected' is actually the n_plus_one detector. 'Unused eager loading' would be if you do have .includes([:shipments]) but you don't consume it.