1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #27926 from st0012/freeze-cache-instrument-name

Freeze fragment cache related instrument name.
This commit is contained in:
Rafael França 2017-02-13 20:53:39 -03:00 committed by GitHub
commit f06ee2a703
3 changed files with 3 additions and 3 deletions

View file

@ -972,7 +972,7 @@ module ActionMailer
end
def instrument_name
"action_mailer"
"action_mailer".freeze
end
ActiveSupport.run_load_hooks(:action_mailer, self)

View file

@ -136,7 +136,7 @@ module AbstractController
def instrument_fragment_cache(name, key) # :nodoc:
payload = instrument_payload(key)
ActiveSupport::Notifications.instrument("#{name}.#{instrument_name}", payload) { yield }
ActiveSupport::Notifications.instrument("#{name}.#{instrument_name}".freeze, payload) { yield }
end
end
end

View file

@ -38,7 +38,7 @@ module ActionController
end
def instrument_name
"action_controller"
"action_controller".freeze
end
end
end