Method: ActiveType::NestedAttributes::Association#validate

Defined in:
lib/active_type/nested_attributes/association.rb

#validate(parent) ⇒ Object



43
44
45
46
47
# File 'lib/active_type/nested_attributes/association.rb', line 43

def validate(parent)
  changed_children(parent).each_with_index do |child, index|
    add_errors_to_parent(parent, child, index) unless child.valid?
  end
end