i have a post and i need to display how long ago it was posted.
When i do this
<%= time_ago_in_words(Time.now - post.created_at) %>
i get the following error
undefined method `abs’ for 2011-04-17
17:16:11 +0300:Time
I think the app can’t convert the time correctly . How can i repair this problem ?
You have got wrong syntax