[Rails] distance_of_time_in_words_to_now with "ago" suffix

Brendon Gleeson brendon at gleesonprop.co.za
Wed Feb 1 08:42:05 GMT 2006


I wanted the distance_of_time_in_words_to_now method to have ' ago' 
suffixed to it when the date is in the past, I assumed this would be the 
default behaviour but apparently not. I know of a REALLY messy way that 
i could solve this with, but it's so ugly I can't be bothered

Does anybody have an easy, elegant solution?


More information about the Rails mailing list