method
build_record
v6.1.7.7 -
Show latest stable
- Class:
ActiveRecord::Associations::ThroughAssociation
build_record(attributes)private
No documentation available.
# File activerecord/lib/active_record/associations/through_association.rb, line 109
def build_record(attributes)
inverse = source_reflection.inverse_of
target = through_association.target
if inverse && target && !target.is_a?(Array)
attributes[inverse.foreign_key] = target.id
end
super
end