From ac4c5e97226fd70510ed49872f0ae41ba0d71c52 Mon Sep 17 00:00:00 2001 From: Ben Orenstein Date: Sat, 26 Feb 2011 13:36:47 -0500 Subject: Example descriptions and their examples were flipped. Fix. --- activesupport/lib/active_support/core_ext/string/filters.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/core_ext/string/filters.rb b/activesupport/lib/active_support/core_ext/string/filters.rb index e15a1df9c9..d478ee0ef6 100644 --- a/activesupport/lib/active_support/core_ext/string/filters.rb +++ b/activesupport/lib/active_support/core_ext/string/filters.rb @@ -25,13 +25,13 @@ class String # "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 :omission string (defaults to "...") - # for a total length not exceeding :length: + # Pass a :separator 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 :separator to truncate +text+ at a natural break: + # The last characters will be replaced with the :omission string (defaults to "...") + # for a total length not exceeding :length: # # "And they found that many people were sleeping better.".truncate(25, :omission => "... (continued)") # # => "And they f... (continued)" -- cgit v1.2.3