app/helpers/application_helper.rb
# An English list is comma delimited, and the final element
# is prepended with a word like 'and'.
An English list is comma delimited, and the final element
is prepended with a word like 'and'.
An English list is comma delimited and the final element is prepended with a word like ' and ' .
def join_english_list list, word = "and"
    raise ArgumentError, "Expected enumerable" unless list.respond_to? :each
    return list.first.to_s if list.count == 1
    return list.slice(0, list.count - 1).join(", ") + ", " + word + " " + list.last.to_s
  end
def join_english_list list , word = "and" raise ArgumentError , "Expected enumerable" unless list . respond_to? :each return list . first . to_s if list . count == 1 return list . slice ( 0 , list . count - 1 ) . join ( ", " ) + ", " + word + " " + list . last . to_s end
An English list is comma delimited, and the final element
is prepended with a word like 'and'.
An English list is comma delimited and the final element is prepended with a word like ' and ' .
list
word