method
_create_record
v6.1.3.1 -
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 123
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