I use the rack profiler in rails just fine, but during some coding sessions, especially when I work on a lot of different client codes, this gets in the way. (mainly on graphs of network debugging tools on the client side, etc.)
I am trying to disable it using the before filter, which also shows if the user is allowed to view the profile, but "deauthorize" seems to do nothing for me. Here my code is called as before filter:
def miniprofiler off = true if off || !current_user Rack::MiniProfiler.deauthorize_request return elsif current_user.role_symbols.include?(:view_page_profiles) Rack::MiniProfiler.authorize_request return end Rack::MiniProfiler.deauthorize_request end
I also know that there is a parameter "Rack :: MiniProfiler.config.authorization_mode", but I can not find documents about possible settings and not see that it is used in the code? Now he tells me: allow_all, but: allow_none does nothing.
Even if I can just temporarily set the value in the dev environment file and restart the server, which will serve my purpose.
ruby-on-rails ruby-on-rails-3
Dave Sanders Sep 13 2018-12-18T00: 00Z
source share