Sha256: bb30d0567aeb1eceae66d02ffbd4ae45b54851052808ef0b4a5aae46599d9cef
Contents?: true
Size: 571 Bytes
Versions: 13
Compression:
Stored size: 571 Bytes
Contents
require 'dm-types/paranoid/base' module DataMapper class Property class ParanoidDateTime < DateTime lazy true # @api private def bind property_name = name.inspect model.class_eval <<-RUBY, __FILE__, __LINE__ + 1 include DataMapper::Types::Paranoid::Base set_paranoid_property(#{property_name}) { ::DateTime.now } default_scope(#{repository_name.inspect}).update(#{property_name} => nil) RUBY end end # class ParanoidDateTime end # module Property end # module DataMapper
Version data entries
13 entries across 13 versions & 2 rubygems