Permalink
Browse files

Including actual usage in example

  • Loading branch information...
1 parent 91761b7 commit 3ca6d0e8fe72f6840049f7c2461243cf362b9896 @mrduncan mrduncan committed Apr 15, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 actionpack/lib/action_view/helpers/date_helper.rb
@@ -115,7 +115,9 @@ def distance_of_time_in_words(from_time, to_time = 0, include_seconds = false, o
# time_ago_in_words(Time.now - 15.hours) # => 15 hours
# 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)
distance_of_time_in_words(from_time, Time.now, include_seconds)
end

0 comments on commit 3ca6d0e

Please sign in to comment.