method
insert_record
v3.1.0 -
Show latest stable
-
0 notes -
Class: ActiveRecord::Associations::HasManyThroughAssociation
insert_record(record, validate = true, raise = false)
public
Hide source
# File activerecord/lib/active_record/associations/has_many_through_association.rb, line 34 def insert_record(record, validate = true, raise = false) ensure_not_nested if record.new_record? if raise record.save!(:validate => validate) else return unless record.save(:validate => validate) end end through_record(record).save! update_counter(1) record end