Question

Can I enable/disable the javascript alerts(but could be even logs) only for some paths/controllers ?

I only found how to skip models, but nothing about paths or controllers. I got a lot of alerts on activeadmin and I cannot change that code.

For example I get one for the column :user_type line: (file app/admin/admin_users.rb)

index do
  column :email
  column :first_name
  column :last_name
  column :user_type

  default_actions
end
Was it helpful?

Solution

They updated the README to describe how to do this in 2015. For StackOverflow completeness, here's how to skip bullet in specific controller actions:

    class ApplicationController < ActionController::Base
        around_action :skip_bullet

        def skip_bullet
            Bullet.enable = false
            yield
        ensure
            Bullet.enable = true
        end
    end
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top