module DeletedAt::ActiveRecord::ClassMethods

Public Instance Methods

all() click to toggle source
# File lib/deleted_at/active_record.rb, line 20
def all
  const_get(:Present)
end
const_missing(const) click to toggle source
Calls superclass method
# File lib/deleted_at/active_record.rb, line 24
def const_missing(const)
  case const
  when :All, :Deleted, :Present
    all_without_deleted_at.tap do |rel|
      rel.deleted_at_scope = const
    end
  else super
  end
end
inherited(subclass) click to toggle source
Calls superclass method
# File lib/deleted_at/active_record.rb, line 15
def inherited(subclass)
  super
  subclass.with_deleted_at self.deleted_at
end