Activate mini-profiler when in profiling env.

This commit is contained in:
Guo Xiang Tan 2017-09-06 11:18:46 +08:00
parent 935afe63f7
commit d61109388c

View File

@ -520,7 +520,7 @@ class ApplicationController < ActionController::Base
end
def mini_profiler_enabled?
defined?(Rack::MiniProfiler) && (guardian.is_developer? || Rails.env.development?)
defined?(Rack::MiniProfiler) && (guardian.is_developer? || Rails.env.development? || Rails.env.profile?)
end
def authorize_mini_profiler