diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-06-22 17:47:45 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-06-22 17:47:45 +0000 |
commit | b533431ce5ec76ac531a4b303aea3afd35a4dde9 (patch) | |
tree | c2bb6df24df5a8f8de2dd8b74927f5742f1cdc8a /activesupport/lib | |
parent | b91e6aa68dcb657dd395bfde9389d2055888477a (diff) | |
download | rails-b533431ce5ec76ac531a4b303aea3afd35a4dde9.tar.gz rails-b533431ce5ec76ac531a4b303aea3afd35a4dde9.tar.bz2 rails-b533431ce5ec76ac531a4b303aea3afd35a4dde9.zip |
Correct and clarify Array#to_sentence docs. Closes #5458.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4485 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib')
-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 2b42a55ab1..1a5ddee9c6 100644 --- a/activesupport/lib/active_support/core_ext/array/conversions.rb +++ b/activesupport/lib/active_support/core_ext/array/conversions.rb @@ -3,8 +3,8 @@ module ActiveSupport #:nodoc: module Array #: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 true to return "a, b, and c" instead of "a, b and c". + # * <tt>:connector</tt>: The word used to join the last element in arrays with two or more elements (default: "and") + # * <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 => false |