summaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2013-06-04 22:24:01 -0600
committermo khan <mo@mokhan.ca>2013-06-04 22:24:01 -0600
commit838f2a942edb0ecebc5d6532a7250063386552a5 (patch)
tree07f1598fdb309e69fb0bb8ef703bbb6b629dd1c5 /app/controllers/application_controller.rb
parent190d683f6ade16993ef92ee5cf500157b0a021cb (diff)
enable profiling for any environment
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index e48c851f..5f76b2c3 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -1,9 +1,14 @@
class ApplicationController < ActionController::Base
protect_from_forgery
+ before_filter :profile_application
private
def resolve(target)
target.new(current_user)
end
+
+ def profile_application
+ Rack::MiniProfiler.authorize_request unless ENV['PROFILE_APPLICATION'].blank?
+ end
end