diff options
author | Ben Orenstein <ben.orenstein@gmail.com> | 2011-02-26 13:36:47 -0500 |
---|---|---|
committer | Ben Orenstein <ben.orenstein@gmail.com> | 2011-02-26 13:36:47 -0500 |
commit | e872a8f2a5c2f9127b9b15a60ba37d5a21e9f6cb (patch) | |
tree | 8da67829144271e393e5c2d60ff3232460a1c8a3 | |
parent | e331ec0952bb199345d2f77a089abf9cd4f44240 (diff) | |
download | rails-e872a8f2a5c2f9127b9b15a60ba37d5a21e9f6cb.tar.gz rails-e872a8f2a5c2f9127b9b15a60ba37d5a21e9f6cb.tar.bz2 rails-e872a8f2a5c2f9127b9b15a60ba37d5a21e9f6cb.zip |
Example descriptions and their examples were flipped. Fix.
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/filters.rb | 6 |
1 files changed, 3 insertions, 3 deletions
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 <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)" |