Validation not working properly with nested form

Hi all,

I have two class
class Person
include MongoMapper::Document
one :address
validates_associated :address

… validates for keys
… other keys
end

class Address
include MongoMapper::EmbeddedDocument
belongs_to :person

… validates for keys
… other keys
end

And i have the following in my view
<%= form_for(@person) do |f| %>

… fields for person

  <%= f.fields_for :address do |address_form| %>
      ... fields for address
  <% end %>

<% end %>

when i click submit button, validation is working for both class,
however
only fields in Person class get highlighted, fields for Address class
will
NOT highlight.

how can i fixed this?

Thanks


View this message in context:
http://old.nabble.com/validation-not-working-properly-with-nested-form-tp32144724p32144724.html
Sent from the RubyOnRails Users mailing list archive at Nabble.com.