DataMapper::Types::Paranoid::Base

Public Class Methods

included(model) click to toggle source
# File lib/dm-types/paranoid/base.rb, line 5
def self.included(model)
  model.extend ClassMethods
  model.instance_variable_set(:@paranoid_properties, {})
end

Public Instance Methods

paranoid_destroy() click to toggle source
# File lib/dm-types/paranoid/base.rb, line 10
def paranoid_destroy
  model.paranoid_properties.each do |name, block|
    attribute_set(name, block.call(self))
  end
  save_self
  self.persistence_state = Resource::PersistenceState::Immutable.new(self)
  true
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.