From 5473e390d362755125d2f47b64ef0a135f2fe111 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 5 Jan 2017 17:20:57 +0900 Subject: `self.` is not needed when calling its own instance method Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby --- actionmailer/lib/action_mailer/preview.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionmailer/lib/action_mailer/preview.rb') diff --git a/actionmailer/lib/action_mailer/preview.rb b/actionmailer/lib/action_mailer/preview.rb index c147ca78d0..b0152aff03 100644 --- a/actionmailer/lib/action_mailer/preview.rb +++ b/actionmailer/lib/action_mailer/preview.rb @@ -63,7 +63,7 @@ module ActionMailer # interceptors will be informed so that they can transform the message # as they would if the mail was actually being delivered. def call(email) - preview = self.new + preview = new message = preview.public_send(email) inform_preview_interceptors(message) message -- cgit v1.2.3