Commit 7dd27681 authored by randx's avatar randx

Rack mini profiler for dev env

parent 9bf7c1ee
...@@ -60,6 +60,7 @@ group :development do ...@@ -60,6 +60,7 @@ group :development do
gem "letter_opener" gem "letter_opener"
gem "rails-footnotes" gem "rails-footnotes"
gem "annotate", :git => "https://github.com/ctran/annotate_models.git" gem "annotate", :git => "https://github.com/ctran/annotate_models.git"
gem 'rack-mini-profiler'
end end
group :development, :test do group :development, :test do
......
...@@ -237,6 +237,8 @@ GEM ...@@ -237,6 +237,8 @@ GEM
rack (1.4.1) rack (1.4.1)
rack-cache (1.2) rack-cache (1.2)
rack (>= 0.4) rack (>= 0.4)
rack-mini-profiler (0.1.9)
rack (>= 1.1.3)
rack-mount (0.8.3) rack-mount (0.8.3)
rack (>= 1.0.0) rack (>= 1.0.0)
rack-protection (1.2.0) rack-protection (1.2.0)
...@@ -408,6 +410,7 @@ DEPENDENCIES ...@@ -408,6 +410,7 @@ DEPENDENCIES
omniauth-ldap! omniauth-ldap!
pry pry
pygments.rb! pygments.rb!
rack-mini-profiler
rails (= 3.2.5) rails (= 3.2.5)
rails-footnotes rails-footnotes
raphael-rails (= 1.5.2) raphael-rails (= 1.5.2)
......
...@@ -4,6 +4,7 @@ class ApplicationController < ActionController::Base ...@@ -4,6 +4,7 @@ class ApplicationController < ActionController::Base
before_filter :set_current_user_for_mailer before_filter :set_current_user_for_mailer
before_filter :check_token_auth before_filter :check_token_auth
before_filter :set_current_user_for_observers before_filter :set_current_user_for_observers
before_filter :dev_tools if Rails.env == 'development'
protect_from_forgery protect_from_forgery
...@@ -142,4 +143,8 @@ class ApplicationController < ActionController::Base ...@@ -142,4 +143,8 @@ class ApplicationController < ActionController::Base
def render_full_content def render_full_content
@full_content = true @full_content = true
end end
def dev_tools
Rack::MiniProfiler.authorize_request
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment