Module: Synchronisable::Model::Scopes

Defined in:
lib/synchronisable/model/scopes.rb

Instance Method Summary collapse

Instance Method Details

#importedObject Also known as: with_import


12
13
14
15
16
# File 'lib/synchronisable/model/scopes.rb', line 12

def imported
  includes(:import)
    .where.not(imports: { synchronisable_id: nil })
    .references(:imports)
end

#not_importedObject Also known as: without_import


6
7
8
9
10
# File 'lib/synchronisable/model/scopes.rb', line 6

def not_imported
  includes(:import)
    .where(imports: { synchronisable_id: nil })
    .references(:imports)
end