method
_create_record
v7.0.0 -
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 126
def _create_record(attributes, raise_error = false, &block)
unless owner.persisted?
raise ActiveRecord::RecordNotSaved.new("You cannot call create unless the parent is saved", owner)
end
super
end