[LRUG] Embarrassing Newbie question

Ben Rooney ben at benrooney.com
Mon Aug 13 11:15:44 PDT 2007


Is there a 1:1 relationship between controllers and models? ie does  
every model have an associated controller, or can one controller  
control more than one model.

I have an app I would like to build in RoR (quite heavy on Ajax and I  
don't fancy doing AJAX in PHP ...). It has about 20 or so models -  
the bulk of the work is going to be CRUD but there will be some cases  
of more complexity. So for example if I had a User class, and an  
organisation class which are going to be predominantly CRUD ops,  
could one controller do that, or do I need one for each?

Apols if this is the stupidest question ever asked...




More information about the Chat mailing list