Skip to content

Commit

Permalink
Added wrapper tag documentation to the simple_format method
Browse files Browse the repository at this point in the history
  • Loading branch information
KensoDev committed May 18, 2012
1 parent 21bff1d commit ede5e9b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion actionpack/lib/action_view/helpers/text_helper.rb
Expand Up @@ -235,13 +235,16 @@ def word_wrap(text, *args)
#
# ==== Options
# * <tt>:sanitize</tt> - If +false+, does not sanitize +text+.
# * <tt>:wrapper_tag</tt> - String representing the tag wrapper, defaults to <tt>"p"</tt>
# * <tt>:wrapper_tag</tt> - String representing the wrapper tag, defaults to <tt>"p"</tt>
#
# ==== Examples
# my_text = "Here is some basic text...\n...with a line break."
#
# simple_format(my_text)
# # => "<p>Here is some basic text...\n<br />...with a line break.</p>"
#
# simple_format(my_text, :wrapper_tag => "div")
# # => "<div>Here is some basic text...\n<br />...with a line break.</div>"
#
# more_text = "We want to put a paragraph...\n\n...right there."
#
Expand Down

0 comments on commit ede5e9b

Please sign in to comment.