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

- old
+ new

@@ -4,17 +4,10 @@ module Date extend ActiveSupport::Concern module ClassMethods 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 - else - nil - end + value.to_date rescue nil end end end end end