lib/rice_bubble/attributes/datetime.rb in rice_bubble-0.2.0 vs lib/rice_bubble/attributes/datetime.rb in rice_bubble-0.2.1

- old
+ new

@@ -1,17 +1,9 @@ module RiceBubble class Attributes class Datetime < Base def call(value, path: '') - super(coerce(value), path:) - end - - def coerce(value) - if !value.respond_to?(:to_datetime) || value.is_a?(::Date) - value - else - value.to_datetime - end + super(value, path:) end def valid_types [::Time, ::DateTime] end