You can write method to validate nested result attributes.
Def valid_nested_results?(results_attributes)
results_attributes.each do|res_attr|
return false if(res_attr[‘attr1’].blank? and res_attr[‘attr2’].blank?
…)
end
return true
end
And use this method in reject_if instead of
attributes[‘results_attributes’].blank?
Or you can also define the appropriate :reject_if for nested attribute
definition for results in treatment model.
Does it help?