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



166
167
168
# File 'lib/marty/monkey.rb', line 166

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

#old_in_time_zoneObject



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

alias_method :old_in_time_zone, :in_time_zone