lib/active_data/model/extensions/date.rb in active_data-0.0.1 vs lib/active_data/model/extensions/date.rb in active_data-0.1.0

- old
+ new

@@ -3,10 +3,10 @@ module Extensions module Date extend ActiveSupport::Concern module ClassMethods - def modelize value + def active_data_type_cast value case value when String then Date.parse(value.to_s) rescue nil when Date, DateTime, Time then value.to_date