Less verbose than time_ago_in_words method?

I’m trying to keep a Last Modified column in my record lists a fixed
width and as narrow as possible.

<%=time_ago_in_words record.updated_at%>

However, making room for certain values like “less than a minute” force
me to make the column twice as wide than, say, “12 hours” or “10 days”.

I would prefer “0 minutes” or “0 hours” instead of “less than a minute”.

Does anyone have a suggestion on how I can do this?

On Sep 12, 2006, at 21:08, Erik Haugo wrote:

I would prefer “0 minutes” or “0 hours” instead of “less than a
minute”.

Does anyone have a suggestion on how I can do this?

Look at the source for the distance_of_time_in_words helper, then
create your own helper method tat acts like you want it.


Jakob S. - http://mentalized.net