I am trying to install Rack-mini-profiler on my ROR application.
I installed the gem and the profiler works great in development but I can't deauthorize specific requests for non admin users.
I placed the following code in my ApplicationController before_filter
Well, for those who run into the same problem...
Deeper debugging found that the gem is configured for ignoring the authorization mechanism on init. In order to enable profiling only on some cases (e.g. non production or only for admin users) you need to override the default configuration in
application.rb (or preferably some specific config file):
Rack::MiniProfiler.config.authorization_mode = :whitelist if Rails.env.production?
otherwise the configuration is set to