Module: Torque::PostgreSQL::Reflection::AssociationReflection

Defined in:
lib/torque/postgresql/reflection/association_reflection.rb

Instance Method Summary collapse

Instance Method Details

#initialize(name, scope, options, active_record) ⇒ Object

Raises:

  • (ArgumentError)


8
9
10
11
12
13
14
15
# File 'lib/torque/postgresql/reflection/association_reflection.rb', line 8

def initialize(name, scope, options, active_record)
  super

  raise ArgumentError, <<-MSG.squish if options[:array] && options[:polymorphic]
    Associations can't be connected through an array at the same time they are
    polymorphic. Please choose one of the options.
  MSG
end