Skip to content

Commit

Permalink
Add controller_name to description (#567)
Browse files Browse the repository at this point in the history
  • Loading branch information
keshavbiswa authored Apr 11, 2023
1 parent 37066c4 commit 0809d9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mini_profiler_rails/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ def self.initialize!(app)
next if !should_measure?

current = Rack::MiniProfiler.current
description = "Executing action: #{payload[:action]}"
controller_name = payload[:controller].sub(/Controller\z/, '').downcase
description = "Executing: #{controller_name}##{payload[:action]}"
Thread.current[get_key(payload)] = current.current_timer
Rack::MiniProfiler.current.current_timer = current.current_timer.add_child(description)
end
Expand Down

0 comments on commit 0809d9c

Please sign in to comment.