Module: Switchman::ActiveRecord::PredicateBuilder

Defined in:
lib/switchman/active_record/predicate_builder.rb

Defined Under Namespace

Modules: AssociationQueryValue

Instance Method Summary collapse

Instance Method Details

#convert_value_to_association_ids(value, primary_key) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/switchman/active_record/predicate_builder.rb', line 4

def convert_value_to_association_ids(value, primary_key)
  if value.is_a?(::ActiveRecord::Base)
    value.send(primary_key) # needed for sharded id translation
  else
    super
  end
end