Permalink
Browse files

Example descriptions and their examples were flipped. Fix.

  • Loading branch information...
1 parent e331ec0 commit e872a8f2a5c2f9127b9b15a60ba37d5a21e9f6cb @r00k r00k committed Feb 26, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 activesupport/lib/active_support/core_ext/string/filters.rb
View
6 activesupport/lib/active_support/core_ext/string/filters.rb
@@ -25,13 +25,13 @@ def squish!
# "Once upon a time in a world far far away".truncate(27)
# # => "Once upon a time in a wo..."
#
- # The last characters will be replaced with the <tt>:omission</tt> string (defaults to "...")
- # for a total length not exceeding <tt>:length</tt>:
+ # Pass a <tt>:separator</tt> to truncate +text+ at a natural break:
#
# "Once upon a time in a world far far away".truncate(27, :separator => ' ')
# # => "Once upon a time in a..."
#
- # Pass a <tt>:separator</tt> to truncate +text+ at a natural break:
+ # The last characters will be replaced with the <tt>:omission</tt> string (defaults to "...")
+ # for a total length not exceeding <tt>:length</tt>:
#
# "And they found that many people were sleeping better.".truncate(25, :omission => "... (continued)")
# # => "And they f... (continued)"

0 comments on commit e872a8f

Please sign in to comment.