Sha256: 8bb226bd1757da9c862d7030ca8bbee48b172faf53bd71585f3def5231188491

Contents?: true

Size: 346 Bytes

Versions: 2

Compression:

Stored size: 346 Bytes

Contents

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

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

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