Is there a standard rails helper that converts an array of strings like ["apple", "banana", "pear"]
into "apple, banana, and pear"
for inserting into a sentence?
Asked
Active
Viewed 1.8k times
47

spike
- 9,794
- 9
- 54
- 85
1 Answers
95
Yeah to_sentence ought to work nicely.

Webjedi
- 4,677
- 7
- 42
- 59
-
18Just when I thought I couldn't be more impressed with Rails, I run into this beauty... – Matthew Clark Jun 20 '14 at 20:50