Class: DataMapper::Property::ParanoidBoolean

Inherits:
Boolean
  • Object
show all
Defined in:
lib/dm-types/paranoid_boolean.rb

Instance Method Summary collapse

Instance Method Details

#bindObject

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.



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/dm-types/paranoid_boolean.rb', line 10

def bind
  property_name = name.inspect

  model.class_eval "include DataMapper::Types::Paranoid::Base\n\nset_paranoid_property(\#{property_name}) { true }\n\ndefault_scope(\#{repository_name.inspect}).update(\#{property_name} => false)\n", __FILE__, __LINE__ + 1
end