For example, I have two models Person and Address, that one person has one address.
class Person < ActiveRecord::Base has_one :address end
class Address < ActiveRecord::Base belongs_to :person
end
Now, I want to write a form to create a person including an address
Name
<%= text_field 'person', 'name', :size => 10 %>
…
Country
<%= text_field 'person', 'address.country' %>