I have the following validates_associated script
class Parent
include Mongoid::Document
validates_associated :son
validates_associated :daughter
end
when I create a parent, either the son or daughter is not created at the same time. Now my problem is that when I try to create a parent with a son, then the check fails due to the check of the children and vice versa.
Is there a way so that I can only check the son when the parameters of the sons are sent, or or only check the daughter when the child parameters are published.
thank
Gagan source
share