diff options
author | Diego Carrion <dc.rec1@gmail.com> | 2011-03-09 16:06:48 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-03-09 18:36:39 -0200 |
commit | 8e73e589a8949c8162f81148bb497804fa641e1d (patch) | |
tree | 807ad034fa0451d31a70b402d4539f69f3c08788 /actionmailer/lib | |
parent | ebe4fa5fbe54cd0559c9e5e58d68326630cfb255 (diff) | |
download | rails-8e73e589a8949c8162f81148bb497804fa641e1d.tar.gz rails-8e73e589a8949c8162f81148bb497804fa641e1d.tar.bz2 rails-8e73e589a8949c8162f81148bb497804fa641e1d.zip |
publicise ActionMailer::MailHelper.format_paragraph
[#6550 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer/mail_helper.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/mail_helper.rb b/actionmailer/lib/action_mailer/mail_helper.rb index 75901bc431..e708e36369 100644 --- a/actionmailer/lib/action_mailer/mail_helper.rb +++ b/actionmailer/lib/action_mailer/mail_helper.rb @@ -29,7 +29,14 @@ module ActionMailer @_message.attachments end - private + # Returns +text+ wrapped at +len+ columns and indented +indent+ spaces. + # + # === Examples + # + # my_text = "Here is a sample text with more than 40 characters" + # + # simple_format(my_text, 25, 4) + # # => " Here is a sample text with\n more than 40 characters" def format_paragraph(text, len = 72, indent = 2) sentences = [[]] |