Sha256: e11d19302b145a7308115fdd07d84c6eedaab0fd0b58d3bade69a9de6807bc45

Contents?: true

Size: 330 Bytes

Versions: 2

Compression:

Stored size: 330 Bytes

Contents

module ActiveData
  module Model
    module Extensions
      module Date
        extend ActiveSupport::Concern

        module ClassMethods
          def active_data_type_cast value
            value.to_date rescue nil
          end
        end
      end
    end
  end
end

Date.send :include, ActiveData::Model::Extensions::Date

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active_data-0.3.0 lib/active_data/model/extensions/date.rb
active_data-0.2.0 lib/active_data/model/extensions/date.rb