Is this a ready made function in Ruby and/or Rails to display something
like “20 minutes ago” with a given date and the current date?
Thanks in advance.
Is this a ready made function in Ruby and/or Rails to display something
like “20 minutes ago” with a given date and the current date?
Thanks in advance.
time_ago_in_words is the function you’re looking for. E.g.,
Last Post: <%= time_ago_in_words %> ago
jbeduya wrote:
Is this a ready made function in Ruby and/or Rails to display something
like “20 minutes ago” with a given date and the current date?Thanks in advance.
–
View this message in context:
http://www.nabble.com/-Rails--Seconds-Minutes-Days-Ago-tf2620153.html#a7312171
Sent from the RubyOnRails Users mailing list archive at Nabble.com.
Thank you so much! Ruby on Rails Rocks!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs