When you make a post on Facebook it will say “2 seconds” ago and after some time it will update to “about a minute ago”. Is there a way to do easily that in rails with the default timestamps? Facebook does this automatically with no page refresh
Share
Sure…You can do so with some pretty easy JS. Take a look at Timeago by Ryan McGeary. It does exactly what you’re looking to do and it’s pretty slick.
http://timeago.yarp.com/
Lots of sites use this kind of functionality including Twitter, FB, Basecamp, etc…