module Undeletable::ClassMethods

Public Instance Methods

delete(id_or_array) click to toggle source
# File lib/undeletable.rb, line 22
def delete(id_or_array)
  raise ActiveRecord::ReadOnlyRecord.new("#{self} is undeletable") if raise_on_delete?
  logger.debug("will not #{self}.delete #{id_or_array.inspect}", e) if Undeletable.debug
end
delete_all(conditions = nil) click to toggle source
# File lib/undeletable.rb, line 27
def delete_all(conditions = nil)
  raise ActiveRecord::ReadOnlyRecord.new("#{self} is undeletable") if raise_on_delete?
  logger.debug("will not #{self}.delete_all", e) if Undeletable.debug
end
raise_on_delete?() click to toggle source
# File lib/undeletable.rb, line 18
def raise_on_delete?
  self.raise_on_delete
end
undeletable?() click to toggle source
# File lib/undeletable.rb, line 14
def undeletable?
  true
end