Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/marty/monkey.rb

Overview

Rails 4 doesn’t handle ‘infinity’ datetime properly due to in_time_zone conversion. Ergo this hack.

Instance Method Summary collapse

Instance Method Details

#in_time_zone(zone = ::Time.zone) ⇒ Object



151
152
153
# File 'lib/marty/monkey.rb', line 151

def in_time_zone(zone = ::Time.zone)
  self == 'infinity' ? self : old_in_time_zone(zone)
end

#old_in_time_zoneObject



149
# File 'lib/marty/monkey.rb', line 149

alias_method :old_in_time_zone, :in_time_zone