class ActiveSupport::Duration

def in_minutes

1.day.in_minutes # => 1440.0

Returns the amount of minutes a duration covers as a float
def in_minutes
  in_seconds / SECONDS_PER_MINUTE.to_f
end