mirror of
https://github.com/awesome-print/awesome_print
synced 2023-03-27 23:22:34 -04:00
Bring back compatibility with old ActiveSupport versions without TimeWithZone defined
This commit is contained in:
parent
fea9567eb4
commit
dfb2cdd485
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ module AwesomePrint
|
|||
def cast_with_active_support(object, type)
|
||||
cast = cast_without_active_support(object, type)
|
||||
if defined?(::ActiveSupport) && defined?(::HashWithIndifferentAccess)
|
||||
if object.is_a?(::ActiveSupport::TimeWithZone) || object.is_a?(::Date)
|
||||
if (defined?(::ActiveSupport::TimeWithZone) && object.is_a?(::ActiveSupport::TimeWithZone)) || object.is_a?(::Date)
|
||||
cast = :active_support_time
|
||||
elsif object.is_a?(::HashWithIndifferentAccess)
|
||||
cast = :hash_with_indifferent_access
|
||||
|
|
Loading…
Reference in a new issue