From ede5e9b3db8e4238009b582f5ff53029d04d0418 Mon Sep 17 00:00:00 2001 From: Avi Tzurel Date: Sat, 19 May 2012 00:39:31 +0300 Subject: Added wrapper tag documentation to the simple_format method --- actionpack/lib/action_view/helpers/text_helper.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers') diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 67117077dc..db146d4a68 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -235,13 +235,16 @@ module ActionView # # ==== Options # * :sanitize - If +false+, does not sanitize +text+. - # * :wrapper_tag - String representing the tag wrapper, defaults to "p" + # * :wrapper_tag - String representing the wrapper tag, defaults to "p" # # ==== Examples # my_text = "Here is some basic text...\n...with a line break." # # simple_format(my_text) # # => "

Here is some basic text...\n
...with a line break.

" + # + # simple_format(my_text, :wrapper_tag => "div") + # # => "
Here is some basic text...\n
...with a line break.
" # # more_text = "We want to put a paragraph...\n\n...right there." # -- cgit v1.2.3 From 90a243895f5c8e43691497ef2977e60adb7ca09b Mon Sep 17 00:00:00 2001 From: Avi Tzurel Date: Sat, 19 May 2012 00:44:11 +0300 Subject: Minor fix to the wrapper tag documentation, the options hash is the last one, added blank hash before that in the args list --- actionpack/lib/action_view/helpers/text_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers') diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index db146d4a68..6d542c819f 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -243,7 +243,7 @@ module ActionView # simple_format(my_text) # # => "

Here is some basic text...\n
...with a line break.

" # - # simple_format(my_text, :wrapper_tag => "div") + # simple_format(my_text, , {} :wrapper_tag => "div") # # => "
Here is some basic text...\n
...with a line break.
" # # more_text = "We want to put a paragraph...\n\n...right there." -- cgit v1.2.3 From ec430d478a989aef7ad27a1f7251c4c378a08b25 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Fri, 18 May 2012 19:11:50 -0500 Subject: minor fix wrapper tag documentation --- actionpack/lib/action_view/helpers/text_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers') diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 6d542c819f..33db4b05bf 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -243,7 +243,7 @@ module ActionView # simple_format(my_text) # # => "

Here is some basic text...\n
...with a line break.

" # - # simple_format(my_text, , {} :wrapper_tag => "div") + # simple_format(my_text, {}, :wrapper_tag => "div") # # => "
Here is some basic text...\n
...with a line break.
" # # more_text = "We want to put a paragraph...\n\n...right there." -- cgit v1.2.3