name
Book_Table:
name
isbn
description
category_id
publisher_id
auther_id
storage_id
[model]
belongs_to :storage
belongs_to :auther
belongs_to :publisher
belongs_to category
My problem is on however to have multiple models in one view. I was
able to use form_tag togather data form all models except book. How
could I get this resolved is my concern? I know that this is a new
bie's kind of question, but I crave for your understand.
My problem is on however to have multiple models in one view. I was
able to use form_tag togather data form all models except book. How
could I get this resolved is my concern? I know that this is a new
bie's kind of question, but I crave for your understand.
You'll want to look at fields_for. Watch the "Complex Forms" trilogy
of Railscasts from a couple years ago.
This is what I am missing, how to include the ids of the models that “has_many” of book model while saving. How to make four ids along with the book data.
read and do this introductions.
As you can see, when you create a book, you collect the ids form the
other models, and then save them in the book model.