method
_create_record
v5.2.3 -
Show latest stable
- Class:
ActiveRecord::Associations::HasOneAssociation
_create_record(attributes, raise_error = false, &block)private
No documentation available.
# File activerecord/lib/active_record/associations/has_one_association.rb, line 111
def _create_record(attributes, raise_error = false, &block)
unless owner.persisted?
raise ActiveRecord::RecordNotSaved, "You cannot call create unless the parent is saved"
end
super
end