views:

24

answers:

1

I'm learning Ruby on Rails.

I'm using some associations (has_many :through, ...)

But i'm having some problems with it when i'm combining my views.

How exactly do i combine these nested forms? Can i do this with partial forms and where do i have to write extra code for this? I have seen examples only use the "view" and others also edit the controller....

An example would be very nice :-)

Edit:

My "little" personal project is about movies, i'll show you the model. I want all the database fields in ONE form...

Where do i begin? => partial forms and put it together afterwards? Or from scratch?

table: boxMovies [ name:string ]

table: boxMovies_movies [ boxMovies_id : string movies_id : string part : integer ]

table: movies [ name : string description : string ]

table: movieNews [ movie_id : int (FK) title : string news : text ]

A: 

I believe this is what you're looking for: accepts_nested_attributes_for, I can give you a more detailed answer if you be more specific.

Patrick Klingemann