From 338750393d0f19b193f0ead26adff2b9f586ec18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 24 Feb 2016 00:08:01 -0300 Subject: Move private methods to the private visibility --- actionmailer/lib/action_mailer/base.rb | 24 ++++++++++++------------ actionpack/lib/action_controller/caching.rb | 22 ++++++++++++---------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 129aa1edfe..559cd06d91 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -828,18 +828,6 @@ module ActionMailer message end - # This and #instrument_name is for caching instrument - def instrument_payload(key) - { - mailer: mailer_name, - key: key - } - end - - def instrument_name - "action_mailer" - end - protected # Used by #mail to set the content type of the message. @@ -960,6 +948,18 @@ module ActionMailer container.add_part(part) end + # This and #instrument_name is for caching instrument + def instrument_payload(key) + { + mailer: mailer_name, + key: key + } + end + + def instrument_name + "action_mailer" + end + ActiveSupport.run_load_hooks(:action_mailer, self) end end diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index 9df4ab6c7a..a9a8508abc 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -27,16 +27,18 @@ module ActionController include AbstractController::Caching end - def instrument_payload(key) - { - controller: controller_name, - action: action_name, - key: key - } - end + private - def instrument_name - "action_controller" - end + def instrument_payload(key) + { + controller: controller_name, + action: action_name, + key: key + } + end + + def instrument_name + "action_controller" + end end end -- cgit v1.2.3