diff options
Diffstat (limited to 'actionmailer/lib/action_mailer/mail_helper.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/mail_helper.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/actionmailer/lib/action_mailer/mail_helper.rb b/actionmailer/lib/action_mailer/mail_helper.rb index ec84256491..54ad9f066f 100644 --- a/actionmailer/lib/action_mailer/mail_helper.rb +++ b/actionmailer/lib/action_mailer/mail_helper.rb @@ -1,4 +1,7 @@ module ActionMailer + # Provides helper methods for ActionMailer::Base that can be used for easily + # formatting messages, accessing mailer or message instances, and the + # attachments list. module MailHelper # Take the text and format it, indented two spaces for each line, and # wrapped at 72 columns. @@ -46,8 +49,9 @@ module ActionMailer end end - sentences.map { |sentence| - "#{" " * indent}#{sentence.join(' ')}" + indentation = " " * indent + sentences.map! { |sentence| + "#{indentation}#{sentence.join(' ')}" }.join "\n" end end |