Module: Torque::PostgreSQL::Associations::Association
- Defined in:
- lib/torque/postgresql/associations/association.rb
Instance Method Summary collapse
Instance Method Details
#inversed_from(record) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/torque/postgresql/associations/association.rb', line 6 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 |