aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Duncan <mrduncan@gmail.com>2011-04-15 19:56:48 -0400
committerMatt Duncan <mrduncan@gmail.com>2011-04-15 19:56:48 -0400
commit3ca6d0e8fe72f6840049f7c2461243cf362b9896 (patch)
tree66597a60c7999969a8c8173749dc70551e1ecaec
parent91761b775ce1f028486dc3483904795e9c028ed6 (diff)
downloadrails-3ca6d0e8fe72f6840049f7c2461243cf362b9896.tar.gz
rails-3ca6d0e8fe72f6840049f7c2461243cf362b9896.tar.bz2
rails-3ca6d0e8fe72f6840049f7c2461243cf362b9896.zip
Including actual usage in example
-rw-r--r--actionpack/lib/action_view/helpers/date_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb
index 6cd1565031..72ee31a246 100644
--- a/actionpack/lib/action_view/helpers/date_helper.rb
+++ b/actionpack/lib/action_view/helpers/date_helper.rb
@@ -115,7 +115,9 @@ module ActionView
# 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