aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/caching
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-14 20:04:43 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-14 20:04:43 -0300
commitf2bff250a017b6da76b7587a164643db31ffbf9b (patch)
tree9eef138f7fae5c6c43cbbaa87e2097db168f7b11 /actionpack/lib/action_controller/caching
parent125cc780c534b836f5443259991307e88b92ad1e (diff)
parent92fbbf67e339f24f9203d9927c028ee052685377 (diff)
downloadrails-f2bff250a017b6da76b7587a164643db31ffbf9b.tar.gz
rails-f2bff250a017b6da76b7587a164643db31ffbf9b.tar.bz2
rails-f2bff250a017b6da76b7587a164643db31ffbf9b.zip
Merge pull request #14137 from dasch/better-fragment-cache-instrumentation
Add controller and action name to the fragment caching instrumentation payload Conflicts: actionpack/CHANGELOG.md
Diffstat (limited to 'actionpack/lib/action_controller/caching')
-rw-r--r--actionpack/lib/action_controller/caching/fragments.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/caching/fragments.rb b/actionpack/lib/action_controller/caching/fragments.rb
index 879d5fdd94..2694d4c12f 100644
--- a/actionpack/lib/action_controller/caching/fragments.rb
+++ b/actionpack/lib/action_controller/caching/fragments.rb
@@ -90,7 +90,13 @@ module ActionController
end
def instrument_fragment_cache(name, key) # :nodoc:
- ActiveSupport::Notifications.instrument("#{name}.action_controller", :key => key){ yield }
+ payload = {
+ controller: controller_name,
+ action: action_name,
+ key: key
+ }
+
+ ActiveSupport::Notifications.instrument("#{name}.action_controller", payload) { yield }
end
end
end