I was thinking that there is a way in the rail to calculate time tickets - half minutes ago, 2 minutes ago , 1 day
I want to know whether there is a built-in function for conversion from such time to time of Ruby / Rail?
You can use:
10.minutes.ago 2.days.since Or you have helpers in your thoughts:
distance_off_time_in_eded (time-to-time) time_ago_in_words (s_time) < / Code> Check out the details and more options.
Comments
Post a Comment