> I tried address still not able to display the address form.
> <% person_form.fields_for :address do |address_form| %>
Please don't top post, insert your comments at appropriate points in
the previous message. It makes it easier to follow the thread.
What do you mean by not able to display address form? Is there an
error shown? If not then what does the generated html look like? If
the html is not correct then what is wrong with it?
basically the code inside the <%
person_form.fields_for :address do |address_form| %> is not
executed. i.e in the html page the label and edit boxes for address is
not displayed to the user. and if you look at view source you dont see
the html tags for them. if you move this code below inside fields_for,
no object information is displayed.
<%= debug(@person.address.attributes) %>
<%= debug(@person.address) %>
if there is better way (work around) to handle one-one mapping.
please let me know as well.