Friendly way to display date / time in rails

November 26, 2009
While integrating twitter into a rails app i found a cool and easy way to display the date / time of the tweets.

This would work well on comments, blog posts etc.. Anyway the way this is done is by :-

   1  time_ago_in_words(example.created_at)

would display as  "about 1 hour"

Thats it, easy as that  !

Bookmark and Share

Why Ruby on Rails ?

Ruby On Rails Logo
Find out how Ruby on Rails could save your company time & money!

Latest News

PCG RLM Thursday 25 March 2010

March 1, 2010
Things are shaping up for a local PCG meeting in Newcastle Upon Tyne
Read more »

Open Source ?

open source technology
Find out why savantis use open source technology & how this can benefit you !

Latest Tweet