diff options
author | Tobias Lütke <tobias.luetke@gmail.com> | 2006-03-08 16:13:13 +0000 |
---|---|---|
committer | Tobias Lütke <tobias.luetke@gmail.com> | 2006-03-08 16:13:13 +0000 |
commit | 8b4729a0eb2020cc5f7ed93951e97335bd3d2700 (patch) | |
tree | 5c96fa6025fc882f75698797589b790196f3e232 /activesupport/lib/active_support/core_ext | |
parent | e320f28945290b527a5634ea473b5a8543d5ab0a (diff) | |
download | rails-8b4729a0eb2020cc5f7ed93951e97335bd3d2700.tar.gz rails-8b4729a0eb2020cc5f7ed93951e97335bd3d2700.tar.bz2 rails-8b4729a0eb2020cc5f7ed93951e97335bd3d2700.zip |
reverted #to_sentence to use red, green, and blue style
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3816 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/array/conversions.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/conversions.rb b/activesupport/lib/active_support/core_ext/array/conversions.rb index 50777f9e1e..faa995bc9c 100644 --- a/activesupport/lib/active_support/core_ext/array/conversions.rb +++ b/activesupport/lib/active_support/core_ext/array/conversions.rb @@ -4,10 +4,10 @@ module ActiveSupport #:nodoc: module Conversions # Converts the array to comma-seperated sentence where the last element is joined by the connector word. Options: # * <tt>:connector</tt>: The word used to join the last element in arrays with more than two elements (default: "and") - # * <tt>:skip_last_comma</tt>: Set to false to return "a, b, and c" instead of "a, b and c". + # * <tt>:skip_last_comma</tt>: Set to true to return "a, b, and c" instead of "a, b and c". def to_sentence(options = {}) options.assert_valid_keys(:connector, :skip_last_comma) - options.reverse_merge! :connector => 'and', :skip_last_comma => true + options.reverse_merge! :connector => 'and', :skip_last_comma => false case length when 0 |