Let's say we have 100 records in lessons table then
%td.last_modified= times_ago_in_words(lesson.updated_at)
server calculate the time ago for each record for each request, it wastes a lot of time on server side.
If we replace above code by
%td.last_modified"= lesson.updated_at.to_s
and load jquery plugin

<script src="jquery.timeago.js" type="text/javascript"></script>

then in JavaScript
thats it.
Then the javascript will calculate the time ago on client side after loading the page in browser.
So you can enhance your app response time.

For more info about timeago jquery plugin [click here(click here)][1]

[1]: http://timeago.yarp.com/