Sha256: 72bc98fecb67b0c938422546135e4a947a7e43d3ef68c374eacb6bb2b29313f6
Contents?: true
Size: 319 Bytes
Versions: 22
Compression:
Stored size: 319 Bytes
Contents
class Datagrid::Filters::DateFilter < Datagrid::Filters::BaseFilter #TODO: more smart date normalizer def format(value) return nil if value.blank? return value.to_date if value.respond_to?(:to_date) return value unless value.is_a?(String) Date.parse(value) rescue ArgumentError nil end end
Version data entries
22 entries across 22 versions & 1 rubygems