method
ensure_not_nested
rails latest stable - Class:
ActiveRecord::Associations::ThroughAssociation
ensure_not_nested()private
No documentation available.
# File activerecord/lib/active_record/associations/through_association.rb, line 106
def ensure_not_nested
if reflection.nested?
if reflection.has_one?
raise HasOneThroughNestedAssociationsAreReadonly.new(owner, reflection)
else
raise HasManyThroughNestedAssociationsAreReadonly.new(owner, reflection)
end
end
end