8 9 10 11 12 13 14 15 16 17
# File 'lib/active_data/model/extensions/date.rb', line 8 def modelize value case value when String then Date.parse(value.to_s) rescue nil when Date, DateTime, Time then value.to_date else nil end end