Module: Cloudelete::ActiveRecord::ClassMethods

Defined in:
lib/cloudelete.rb

Instance Method Summary collapse

Instance Method Details

#deletedObject



14
15
16
# File 'lib/cloudelete.rb', line 14

def deleted
  unscoped.where('deleted_at IS NOT NULL')
end

#is_soft_deletedObject



9
10
11
12
# File 'lib/cloudelete.rb', line 9

def is_soft_deleted
  default_scope where(deleted_at: nil)
  send :include, InstanceMethods
end

#with_deletedObject



18
19
20
# File 'lib/cloudelete.rb', line 18

def with_deleted
  unscoped
end