module Millstone::ActiveRecord::Extension::ClassMethods::InstanceMethods
Public Instance Methods
deleted?()
click to toggle source
# File lib/millstone/active_record/extension.rb, line 119 def deleted? !millstone_column_value.nil? end
destroy()
click to toggle source
# File lib/millstone/active_record/extension.rb, line 91 def destroy with_transaction_returning_status do _run_destroy_callbacks do raise AlreadyMarkedDeletion, "#{self.class.name} ID=#{self.id} already marked deletion." unless self.millstone_column_value.nil? self.class.delete(self.id) self.millstone_column_value = self.class.millstone_generate_column_value freeze end end end
destroy!()
click to toggle source
# File lib/millstone/active_record/extension.rb, line 102 def destroy! with_transaction_returning_status do _run_destroy_callbacks do self.class.delete!(self.id) freeze end end end
millstone_column_value()
click to toggle source
# File lib/millstone/active_record/extension.rb, line 123 def millstone_column_value self.send(self.class.millstone_column) end
recover(options = {})
click to toggle source
# File lib/millstone/active_record/extension.rb, line 111 def recover(options = {}) raise "Millstone is not support" end
recover_dependent_associations(window, options = {})
click to toggle source
# File lib/millstone/active_record/extension.rb, line 115 def recover_dependent_associations(window, options = {}) raise "Millstone is not support" end
Private Instance Methods
millstone_column_value=(value)
click to toggle source
# File lib/millstone/active_record/extension.rb, line 128 def millstone_column_value=(value) self.send("#{self.class.millstone_column}=", value) end