For completeness, and because I also had this problem, and I solved it if you want, you can customize the model when it is used in a nested form, just as you do with editing, updating, creating, and nesting.
class Contact < ActiveRecord::Base
Visit the official wiki for more information.
source share