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

Setting the Bullet.enable swtich, flips the Bullet.unused_eager_loading_enable value #703

Open
varchar opened this issue Feb 26, 2024 · 2 comments

Comments

@varchar
Copy link

varchar commented Feb 26, 2024

Setting the Bullet.enable swtich, flips the Bullet.unused_eager_loading_enable value.

3.2.2 :005 > Bullet.unused_eager_loading_enable? => false 3.2.2 :006 > Bullet.enable = true => true 3.2.2 :007 > Bullet.unused_eager_loading_enable? => true 3.2.2 :009 > Bullet.unused_eager_loading_enable = false => false 3.2.2 :010 > Bullet.unused_eager_loading_enable?
=> false

@yauhenininjia
Copy link

Faced the same issue, bullet version 7.1.6

@xeron
Copy link

xeron commented Oct 30, 2024

Similar issue, using code from readme:

    def skip_bullet
      previous_value = Bullet.enable?
      Bullet.enable = false
      yield
    ensure
      Bullet.enable = previous_value
    end
around_action :skip_bullet

after bullet re-enabled settings seem to reset to default. At least Bullet.counter_cache_enable = false is not having an effect anymore which causes tests to fail.

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

3 participants