提交 435aa7e3 编写于 作者: A Anton Davydov

[ci skip] Add code example for MailHelper#block_format documentation

上级 daa455f5
......@@ -4,7 +4,17 @@ module ActionMailer
# attachments list.
module MailHelper
# Take the text and format it, indented two spaces for each line, and
# wrapped at 72 columns.
# wrapped at 72 columns:
#
# text = <<-TEXT
# This is
# the paragraph.
#
# * item1 * item2
# TEXT
#
# block_format text
# # => " This is the paragraph.\n\n * item1\n * item2\n"
def block_format(text)
formatted = text.split(/\n\r?\n/).collect { |paragraph|
format_paragraph(paragraph)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册