# Multiple models for one controller

**URL:** <https://discuss.rubyonrails.org/t/multiple-models-for-one-controller/953>\
**Category:** rubyonrails-talk\
**Created:** [September 2, 2006, 2:09am UTC](https://discuss.rubyonrails.org/t/multiple-models-for-one-controller/953 "2006-09-02T02:09:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh\_Stephenson](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@Josh\_Stephenson](https://discuss.rubyonrails.org/u/Josh_Stephenson)\
**Post date:** [September 2, 2006, 2:09am UTC](https://discuss.rubyonrails.org/t/multiple-models-for-one-controller/953/1 "2006-09-02T02:09:40Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Peter\_Michaux](https://avatars.discourse-cdn.com/v4/letter/p/7feea3/32.png) [@Peter\_Michaux](https://discuss.rubyonrails.org/u/Peter_Michaux)\
**Post date:** [September 2, 2006, 3:57pm UTC](https://discuss.rubyonrails.org/t/multiple-models-for-one-controller/953/2 "2006-09-02T15:57:21Z")

</div>

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
