Permalink
Browse files

Added wrapper tag documentation to the simple_format method

  • Loading branch information...
1 parent 21bff1d commit ede5e9b3db8e4238009b582f5ff53029d04d0418 @KensoDev KensoDev committed May 18, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 actionpack/lib/action_view/helpers/text_helper.rb
@@ -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."
#

0 comments on commit ede5e9b

Please sign in to comment.