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

Amazon S3 in AWS Management Console Demo

June 10, 2010
Amazon announce that the AWS Management Console now provides a simple and intuitive web interface for managing your Amazon S3 resources.
Read more »

Open Source ?

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

Latest Tweet