diff options
author | Ben Orenstein <ben.orenstein@gmail.com> | 2011-02-26 13:36:47 -0500 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-03-05 11:56:31 +0100 |
commit | ac4c5e97226fd70510ed49872f0ae41ba0d71c52 (patch) | |
tree | 7ba0c22b973c25bb1748626c2122be21c84a4f5d | |
parent | 8f526b30f49b8441dc80f00a42a58fc4ab61011a (diff) | |
download | rails-ac4c5e97226fd70510ed49872f0ae41ba0d71c52.tar.gz rails-ac4c5e97226fd70510ed49872f0ae41ba0d71c52.tar.bz2 rails-ac4c5e97226fd70510ed49872f0ae41ba0d71c52.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)" |