# Model - controller always one-on-one?

**URL:** <https://www.ruby-forum.com/t/model-controller-always-one-on-one/82752>\
**Category:** Rails\
**Created:** [December 30, 2005, 1:33pm UTC](https://www.ruby-forum.com/t/model-controller-always-one-on-one/82752 "2005-12-30T13:33:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 30, 2005, 1:33pm UTC](https://www.ruby-forum.com/t/model-controller-always-one-on-one/82752/1 "2005-12-30T13:33:53Z")

</div>

Hi All,

Is it necessary to always have a controller per model?

Rephrased:

Would you end up jumping through hoops in the future if you have a  
controller  
called Customer in which you add methods to create new companies as well  
as  
new contacts?

Thanx

Regards,

Gerard.

–  
“Who cares if it doesn’t do anything? It was made with our new  
Triple-Iso-Bifurcated-Krypton-Gate-MOS process …”

My $Grtz =~ Gerard;  
~  
:wq!

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 30, 2005, 1:48pm UTC](https://www.ruby-forum.com/t/model-controller-always-one-on-one/82752/2 "2005-12-30T13:48:56Z")

</div>

Am 30.12.2005 um 13:33 schrieb Gerard:

> new contacts?  
> No

\*m

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 30, 2005, 1:51pm UTC](https://www.ruby-forum.com/t/model-controller-always-one-on-one/82752/3 "2005-12-30T13:51:58Z")

</div>

Manuel,

Was that a ‘no’ on the 1st or the 2nd question … 🙂

Thanx n Greetz

Gerard.

On Friday 30 December 2005 13:47, Manuel H. tried to type  
something  
like:

> > well as  
> > new contacts?
> 
> No
> 
> \*m
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–  
“Who cares if it doesn’t do anything? It was made with our new  
Triple-Iso-Bifurcated-Krypton-Gate-MOS process …”

My $Grtz =~ Gerard;  
~  
:wq!

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 2, 2006, 8:30pm UTC](https://www.ruby-forum.com/t/model-controller-always-one-on-one/82752/4 "2006-01-02T20:30:30Z")

</div>

It is not necessary.

I for one tend to think controller as defining functional domains,  
while models define data units

Functionality can depend on multiple models (since it can use data of  
multiple kind).

Exemple :  
a customer can be thought of as a data unit  
a company can be thought of as a data unit

Creating an invoice is a functionality which requires data from both  
the customer data unit and the company data unit.

Now that is a good occasion to see just how wrong I could be, let’s  
see if others agee with me 🙂

Jean
