class ActiveSupport::Duration

def to_s

1.day.to_s # => "86400"

For more information check to_i method.
Returns the amount of seconds a duration covers as a string.
def to_s
  @value.to_s
end