Thin controllers and fat models

I’ve read this a few times recently.
I thought a model’s job was only to explain “This is how I behave
myself” and the controller’s job was to explain “This is what I do”.
Is this basically right? So why do people want to stuff more and more
stuff in the model?

You want the controller to responsible for passing model data from the
database to the view and vice versa. You don’t want to clutter the
controller with model specific logic…that’s why you want it in the
model where it’s self-contained. Try this article:

http://www.therailsway.com/2007/6/1/railsconf-recap-skinny-controllers

On Sep 3, 2:09 pm, Aldric G. [email protected]

No, I think the reasoning is that a model is “This is how my business
logic works”, and a controller is “This is what the outside world is
allowed to requests of my models”.

On Sep 3, 3:09 pm, Aldric G. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs