module DeletedAt::Core::ClassMethods
Public Instance Methods
deleted_at_attributes()
click to toggle source
# File lib/deleted_at/core.rb, line 40 def deleted_at_attributes attributes = { deleted_at[:column] => deleted_at[:proc].call } end
with_deleted_at(options={}, &block)
click to toggle source
# File lib/deleted_at/core.rb, line 28 def with_deleted_at(options={}, &block) self.deleted_at = DeletedAt::DEFAULT_OPTIONS.merge(options) self.deleted_at[:proc] = block if block_given? return if ::DeletedAt.disabled? DeletedAt::Core.raise_missing(self) unless Core.has_deleted_at_column?(self) self.prepend(DeletedAt::ActiveRecord) end