Topic: Nested Form Builder
I am just not to sure how to build a nested form. I have followed Ryan Railscasts but I am unsure on how to create a new instance in my case.
I have the following models
Book Manager, and
In my case a customer has many book_managers, and a book_managers has many books.
The part that confused me his to create a new instance in the single form. I have a description which belongs to book and I have a isVisible who belongs to book_managers
Here what i am thinking but doesn't seem to be working
@customer = Customer.find(params[:id])
@bookmanager = BookManager.new(params[:bookmanager])
@book = Book.new(params[:book])
It doesn't work and not sure how to create the relationship. Any help on it is appreciated!