I have a Person model and an Address Model:
class Person < ActiveRecord::Base
has_one :address
accepts_nested_attributes_for :address
end
class Addr
Why is your address built in your new action, and not in the create action? You're building an address from a non saved model, without an id, so the foreign key can't be set. You should keep your @person in your new action, but put your build_address in your create action, after @person has been saved.