lib/mini_profiler_rails/railtie.rb in rack-mini-profiler-1.0.0 vs lib/mini_profiler_rails/railtie.rb in rack-mini-profiler-1.0.1
- old
+ new
@@ -42,11 +42,11 @@
# If the user has not changed from the default memory store then switch to the file store, otherwise keep what the user set
if c.storage == Rack::MiniProfiler::MemoryStore && c.storage_options.nil?
base_path = Rails.application.config.paths['tmp'].first rescue "#{Rails.root}/tmp"
tmp = base_path + '/miniprofiler'
- c.storage_options = {:path => tmp}
+ c.storage_options = { path: tmp }
c.storage = Rack::MiniProfiler::FileStore
end
# Quiet the SQL stack traces
c.backtrace_remove = Rails.root.to_s + "/"
@@ -56,13 +56,13 @@
# Install the Middleware
app.middleware.insert(0, Rack::MiniProfiler)
# Attach to various Rails methods
ActiveSupport.on_load(:action_controller) do
- ::Rack::MiniProfiler.profile_method(ActionController::Base, :process) {|action| "Executing action: #{action}"}
+ ::Rack::MiniProfiler.profile_method(ActionController::Base, :process) { |action| "Executing action: #{action}" }
end
ActiveSupport.on_load(:action_view) do
- ::Rack::MiniProfiler.profile_method(ActionView::Template, :render) {|x,y| "Rendering: #{@virtual_path}"}
+ ::Rack::MiniProfiler.profile_method(ActionView::Template, :render) { |x, y| "Rendering: #{@virtual_path}" }
end
@already_initialized = true
end