From 46156b87c0623e7de833584b2ee5939a4ae77674 Mon Sep 17 00:00:00 2001 From: Oscar Del Ben Date: Tue, 15 May 2012 19:46:40 -0700 Subject: Update action view context docs. --- actionpack/lib/action_view/context.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/context.rb b/actionpack/lib/action_view/context.rb index 083856b2ca..245849d706 100644 --- a/actionpack/lib/action_view/context.rb +++ b/actionpack/lib/action_view/context.rb @@ -5,7 +5,7 @@ module ActionView # = Action View Context # - # Action View contexts are supplied to Action Controller to render template. + # Action View contexts are supplied to Action Controller to render a template. # The default Action View context is ActionView::Base. # # In order to work with ActionController, a Context must just include this module. @@ -25,7 +25,7 @@ module ActionView end # Encapsulates the interaction with the view flow so it - # returns the correct buffer on yield. This is usually + # returns the correct buffer on +yield+. This is usually # overwriten by helpers to add more behavior. # :api: plugin def _layout_for(name=nil) -- cgit v1.2.3 From 334c43370b3a0f179a282080e1d47f072706e1bc Mon Sep 17 00:00:00 2001 From: Hendy Tanata Date: Thu, 17 May 2012 16:12:21 +0800 Subject: Fix code example for word_wrap helper. --- actionpack/lib/action_view/helpers/text_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 074cbb202d..5fdb48ac6b 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -199,10 +199,10 @@ module ActionView # # => Once upon a time # # word_wrap('Once upon a time, in a kingdom called Far Far Away, a king fell ill, and finding a successor to the throne turned out to be more trouble than anyone could have imagined...') - # # => Once upon a time, in a kingdom called Far Far Away, a king fell ill, and finding\n a successor to the throne turned out to be more trouble than anyone could have\n imagined... + # # => Once upon a time, in a kingdom called Far Far Away, a king fell ill, and finding\na successor to the throne turned out to be more trouble than anyone could have\nimagined... # # word_wrap('Once upon a time', :line_width => 8) - # # => Once upon\na time + # # => Once\nupon a\ntime # # word_wrap('Once upon a time', :line_width => 1) # # => Once\nupon\na\ntime -- cgit v1.2.3 From 612f7fe7014294d646f4b46ed3b927f68ee76fc7 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Thu, 17 May 2012 17:44:40 +0530 Subject: fix word_wrap eg output [ci skip] --- actionpack/lib/action_view/helpers/text_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 5fdb48ac6b..2c24bbb37b 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -209,7 +209,9 @@ module ActionView # # You can still use word_wrap with the old API that accepts the # +line_width+ as its optional second parameter: - # word_wrap('Once upon a time', 8) # => Once upon\na time + # + # word_wrap('Once upon a time', 8) + # # => Once\nupon a\ntime def word_wrap(text, *args) options = args.extract_options! unless args.blank? -- cgit v1.2.3