aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorAnton Davydov <antondavydov.o@gmail.com>2015-05-25 13:48:29 +0300
committerAnton Davydov <antondavydov.o@gmail.com>2015-05-25 16:36:37 +0300
commit2c725896b2ddab0cc9ee29ede1608d551efdf06c (patch)
tree6c6c29ce615e9b4c9e7851eea1b06249ec7a45e7 /activesupport
parentd0a370ec93c7e1118f3f58effe2e64712d3492bd (diff)
downloadrails-2c725896b2ddab0cc9ee29ede1608d551efdf06c.tar.gz
rails-2c725896b2ddab0cc9ee29ede1608d551efdf06c.tar.bz2
rails-2c725896b2ddab0cc9ee29ede1608d551efdf06c.zip
[skip ci] Update documentation for Duration#to_s
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/duration.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/duration.rb b/activesupport/lib/active_support/duration.rb
index 4c0d1197fe..c63b61e97a 100644
--- a/activesupport/lib/active_support/duration.rb
+++ b/activesupport/lib/active_support/duration.rb
@@ -52,6 +52,10 @@ module ActiveSupport
end
end
+ # Returns the amount of seconds a duration covers as a string.
+ # For more information check to_i method.
+ #
+ # 1.day.to_s # => "86400"
def to_s
@value.to_s
end