Multiple models for one controller

Hi All,

I want to know what the best to manage multiple models in one controller is. I have a series of tables that simply manage geogrophical ids, topic ids, type ids, etc.... and I'd like to manage them all from one controller.

What's the best way to accomplish this?

Josh Stephenson wrote:

Hi All,

I want to know what the best to manage multiple models in one controller is. I have a series of tables that simply manage geogrophical ids, topic ids, type ids, etc.... and I'd like to manage them all from one controller.

Why do you want to use only one controller? Is it because the code in each controller is so similar and you want to stay DRY?

There are better ways than using just one controller. You could have a controller hierarchy using OOP inheritance, you could use your own scaffolding metaprogramming, or you could write a module and mix it into your controllers.

Peter