rails/rails — pull request #7398 by iamvery (2012-08-20 15:17:06+00:00)
Title: Extended documentation for `time_ago_in_words` helper

I'm submitting this pull request because of some confusion I had using this method (and its alias). When I originally tried the method, I attempted to do something like `time_ago_in_words 15.minutes` which now I realize was an error on my part because this method expects its argument to be a `Time`.

My initial reaction was that this is a pretty obvious bug in rails since it didn't jump out to me in the docs that the argument must be a `Time` and writing it as `time_ago_in_words 15.minutes.ago` felt a little clumsy with the "ago" redundancy.

It was even a little more confusing going from using the `distance_of_time_in_words` method with simple `15.minutes` (because the default `from_time` is simply `0`) to the alias method `distance_of_time_in_words_to_now` and having to supply a `Time`.

Anyway, at the very least, it seems some minor improvements to the docs (perhaps what I've attached?) may help the situation, and at the most perhaps some retinkering of this API (a job I currently feel unqualified of).

Thanks for the awesome work!