From b75c0bb3785d907b4d811282252f8a684599c15b Mon Sep 17 00:00:00 2001 From: Carson McDonald Date: Fri, 5 Apr 2013 23:15:04 -0400 Subject: Typo fix --- actionpack/lib/action_view/helpers/text_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 2e124cf085..883d97d06a 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -126,8 +126,8 @@ module ActionView # Extracts an excerpt from +text+ that matches the first instance of +phrase+. # The :radius option expands the excerpt on each side of the first occurrence of +phrase+ by the number of characters # defined in :radius (which defaults to 100). If the excerpt radius overflows the beginning or end of the +text+, - # then the :omission option (which defaults to "...") will be prepended/appended accordingly. The - # :separator enable to choose the delimation. The resulting string will be stripped in any case. If the +phrase+ + # then the :omission option (which defaults to "...") will be prepended/appended accordingly. Use the + # :separator option to choose the delimitation. The resulting string will be stripped in any case. If the +phrase+ # isn't found, nil is returned. # # excerpt('This is an example', 'an', radius: 5) @@ -145,7 +145,7 @@ module ActionView # excerpt('This is also an example', 'an', radius: 8, omission: ' ') # # => is also an example # - # excerpt('This is a very beautiful morning', 'very', separator: ' ', radius: 1) + # excerpt('This is a very beautiful morning', 'very', separator: ' ', radius: 1) # # => ...a very beautiful... def excerpt(text, phrase, options = {}) return unless text && phrase -- cgit v1.2.3