Module: Torque::PostgreSQL::Associations::Association

Defined in:
lib/torque/postgresql/associations/association.rb

Instance Method Summary collapse

Instance Method Details

#inversed_from(record) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/torque/postgresql/associations/association.rb', line 8

def inversed_from(record)
  return super unless reflection.connected_through_array?

  self.target ||= []
  self.target.push(record) unless self.target.include?(record)
  @inversed = self.target.present?
end

#skip_statement_cache?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/torque/postgresql/associations/association.rb', line 16

def skip_statement_cache?(*)
  super || reflection.connected_through_array?
end