From 1ed6ff1006fb5fd816b8b0267754b3113828e918 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Mon, 13 May 2013 09:20:19 +0530 Subject: Extract variable out of loop --- actionmailer/lib/action_mailer/mail_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionmailer/lib') diff --git a/actionmailer/lib/action_mailer/mail_helper.rb b/actionmailer/lib/action_mailer/mail_helper.rb index ec84256491..d63d3b94a5 100644 --- a/actionmailer/lib/action_mailer/mail_helper.rb +++ b/actionmailer/lib/action_mailer/mail_helper.rb @@ -46,8 +46,9 @@ module ActionMailer end end + indentation = " " * indent sentences.map { |sentence| - "#{" " * indent}#{sentence.join(' ')}" + "#{indentation}#{sentence.join(' ')}" }.join "\n" end end -- cgit v1.2.3