Rails Snippet: Write like Orwell with to_sentence

1 · Ariejan de Vroom · May 9, 2007, midnight
A few weeks ago I posted an article that explained how to create a comma separated list from a hash of objects. When I was browsing the Rails API documentation I came across a method named to_sentence. What this little bugger does is create a human readable, comma separated list of items in an array or hash. But the big difference here is that you can specify what the last separator must be....