method
add_to_target
v4.2.1 -
Show latest stable
- Class:
ActiveRecord::Associations::CollectionAssociation
add_to_target(record, skip_callbacks = false, &block)public
No documentation available.
# File activerecord/lib/active_record/associations/collection_association.rb, line 399
def add_to_target(record, skip_callbacks = false, &block)
if association_scope.distinct_value
index = @target.index(record)
end
replace_on_target(record, index, skip_callbacks, &block)
end