Module: Chewy::Type::Adapter::Rails5

Included in:
ActiveRecord
Defined in:
lib/chewy/type/adapter/active_record.rb

Instance Method Summary collapse

Instance Method Details

#pluck_ids(scope) ⇒ Object



62
63
64
# File 'lib/chewy/type/adapter/active_record.rb', line 62

def pluck_ids(scope)
  scope.except(:includes).distinct.pluck(target.primary_key.to_sym)
end