Skip to content
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

add_safelist ignored #654

Open
josegrad opened this issue Apr 6, 2023 · 1 comment
Open

add_safelist ignored #654

josegrad opened this issue Apr 6, 2023 · 1 comment

Comments

@josegrad
Copy link

josegrad commented Apr 6, 2023

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])
@Crisfole
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants