From d95fbd89d0e3adf3f6cfcae1a4781abc3b7eaa73 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Tue, 29 Nov 2016 10:59:10 +0800 Subject: [PATCH] Enable miniprofiler in development automatically. --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 223189b28df..a6a1300b514 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -465,7 +465,7 @@ class ApplicationController < ActionController::Base end def mini_profiler_enabled? - defined?(Rack::MiniProfiler) && guardian.is_developer? + defined?(Rack::MiniProfiler) && (guardian.is_developer? || Rails.env.development?) end def authorize_mini_profiler