about summary refs log tree commit diff
path: root/config/initializers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-25 15:09:40 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-25 15:09:40 +0100
commit318886287b289a8caccf19102da8584453ef7faa (patch)
treeb3cf78d9c9b52c750aa3539072158fc49081c9e6 /config/initializers
parent36f3da3cde2bc2148e156a5dd09d732a06b44ddd (diff)
Fixing some stuff for Turbolinks, adding gzip on top, fixing a n+1 query
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/rack-mini-profiler.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/initializers/rack-mini-profiler.rb b/config/initializers/rack-mini-profiler.rb
new file mode 100644
index 000000000..b1d45e257
--- /dev/null
+++ b/config/initializers/rack-mini-profiler.rb
@@ -0,0 +1,6 @@
+require 'rack-mini-profiler'
+
+Rack::MiniProfilerRails.initialize!(Rails.application)
+
+Rails.application.middleware.delete(Rack::MiniProfiler)
+Rails.application.middleware.insert_after(Rack::Deflater, Rack::MiniProfiler)