Module: Switchman::ActiveRecord::PredicateBuilder::PolymorphicArrayValue

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

Instance Method Summary collapse

Instance Method Details

#convert_to_id(value) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/switchman/active_record/predicate_builder.rb', line 15

def convert_to_id(value)
  case value
  when ::ActiveRecord::Base
    value.send(primary_key(value))
  else
    super
  end
end