Organization of controllers


I need some help in wrapping my head around the following problem:

I want to layout a site in a similar manner as
ondemand/. There you hae a tree on the left hand side and details of
the tree-selection in the (lower) middle. You can switch what type of
info should be shown by tabs in the middle.

Here, I have a hierarchical set of keywords. Each keyword is related
to one product and there are many images “tagged” with that category.

I’m showing the keyword tree on the left hand side. Currently, it has
it’s own controller, which has some actions for adding a new keyword,
renaming, etc.
In the main section, I’d like to show either Images tagged wih the
selected keyword or details on the Product related to the selected
keyword, depending on the application state (selected tab).
Currently, the images are handled by one controller, the Products are
handled by several other controllers, depending on the type of the

When a keyword is selected, how can I “dispatch” to the correct
controller? redirect_to seems not to work with AJAX requests (See my
other posting “respond_to and redirect_to”).

What’s the best way to accomplish that? Am I thinking the wrong way
regarding the organization of all the stuff in separate controllers?

Thank you very much for any help,


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs