aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib
diff options
context:
space:
mode:
authorDiego Carrion <dc.rec1@gmail.com>2011-03-09 16:06:48 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2011-03-09 18:36:39 -0200
commit8e73e589a8949c8162f81148bb497804fa641e1d (patch)
tree807ad034fa0451d31a70b402d4539f69f3c08788 /actionmailer/lib
parentebe4fa5fbe54cd0559c9e5e58d68326630cfb255 (diff)
downloadrails-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.rb9
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 = [[]]