Class: DataMapper::Property::ParanoidDateTime
- Inherits:
-
DateTime
- Object
- DateTime
- DataMapper::Property::ParanoidDateTime
- Defined in:
- lib/dm-types/paranoid_datetime.rb
Instance Method Summary collapse
- #bind ⇒ Object private
Instance Method Details
#bind ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/dm-types/paranoid_datetime.rb', line 9 def bind property_name = name.inspect model.class_eval " include DataMapper::Types::Paranoid::Base\n\n set_paranoid_property(\#{property_name}) { ::DateTime.now }\n\n default_scope(\#{repository_name.inspect}).update(\#{property_name} => nil)\n RUBY\nend\n", __FILE__, __LINE__ + 1 |