Method: ActAsDisabled::Query#aad_default_scope

Defined in:
lib/act_as_disabled.rb

#aad_default_scopeObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/act_as_disabled.rb', line 12

def aad_default_scope
  scope = all
  if string_type_with_deleted_value?
    scope.where(aad_column => nil).or(scope.where.not(aad_column => aad_config[:deleted_value]))
  elsif boolean_type_not_nullable?
    scope.where(aad_column => false)
  else
    scope.where(aad_column => nil)
  end
end