I am interested in finding a good architectural way to call a different
controller from a current view.
The example is for a parent-child relationship. When the user presses
a button (in the parent form) in order to get the child form, I
currently just call the list method of the child's controller using the
post method of the parent form.
Perhaps, architecturally, it may be cleaner to call something like a
"listchildren" method within the parent controller, that is if the
philosophy is to keep controllers, models, and views concerning the
same table/model. Since I currently send the id of the child record to
the list method of the child, I would now have to send the id of the
child record to the listchildren method of the parent controller.
Then, I assume the parent controller would just call the child
controller and just pass along the child id as a parameter.
So, my question is how is this done with Ruby On Rails code?