So finally I have also decided to roll my engines on Rails. But I am
kind of stuck in a situation. I understand that for every model there is
a controller class. This controller class has cirtain set of methods
where each method defines cirtain action to be performed. And each of
this action renders cirtain UI.
Now let say I have a object “Car”. Apart from having basic attributes
like car name, model, etc etc, tt has a list of “parts” that a car has.
This essentially means i have two models (or tables in db) “Car” and
“Part” and “Cars_Controller” and “Parts_COntroller”.
Now I want to develop an edit interface for this scenario. The edit
interface has two tabs “General Car Details” and “Car Parts”.
Now I understand that when I select to “edit” a car. This will take me
two first edit screen where I will see “General Car Details” (as default
selected tab). The problem is that I couldn’t figure out how do I move
to next tab which is “Parts” tab. Should I create a new action something
like “EditCarParts” or is there any way to define sub action for edit
action or something liek that?
My second question is by default an ection is binded to a citan view.
For example “Edit” action is binded to “Edit.rhtml” page. How can i