Forum: Ruby on Rails model - controller always one-on-one?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4710a8ada2adc162aaee4288d9879d8e?d=identicon&s=25 Gerard (Guest)
on 2005-12-30 13:33
(Received via mailing list)
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!
54532f023496410e0d7b1add5561ba45?d=identicon&s=25 Manuel Holtgrewe (Guest)
on 2005-12-30 13:48
(Received via mailing list)
Am 30.12.2005 um 13:33 schrieb Gerard:

> new contacts?
No

*m
4710a8ada2adc162aaee4288d9879d8e?d=identicon&s=25 Gerard (Guest)
on 2005-12-30 13:51
(Received via mailing list)
Manuel,

Was that a 'no' on the 1st or the 2nd question .. :-)

Thanx n Greetz

Gerard.

On Friday 30 December 2005 13:47, Manuel Holtgrewe tried to type
something
like:
> > well as
> > new contacts?
>
> No
>
> *m
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> 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!
75da740d43c5780539214f24ce1148a6?d=identicon&s=25 Jean Helou (Guest)
on 2006-01-02 20:30
(Received via mailing list)
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
This topic is locked and can not be replied to.