1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Including actual usage in example

This commit is contained in:
Matt Duncan 2011-04-15 19:56:48 -04:00
parent 91761b775c
commit 3ca6d0e8fe

View file

@ -115,7 +115,9 @@ module ActionView
# time_ago_in_words(Time.now - 15.hours) # => 15 hours # time_ago_in_words(Time.now - 15.hours) # => 15 hours
# time_ago_in_words(Time.now) # => less than a minute # time_ago_in_words(Time.now) # => less than a minute
# #
# from_time = Time.now - 3.days - 14.minutes - 25.seconds # => 3 days # from_time = Time.now - 3.days - 14.minutes - 25.seconds
# time_ago_in_words(from_time) # => 3 days
#
def time_ago_in_words(from_time, include_seconds = false) def time_ago_in_words(from_time, include_seconds = false)
distance_of_time_in_words(from_time, Time.now, include_seconds) distance_of_time_in_words(from_time, Time.now, include_seconds)
end end