What methods go in the model vs. the controller?

I suspect my brain is staring to reform itself to Rails thinking, but
I need help with a concept:

On p. 150 of the Agile Web Dev book, we put a method in the Orders
model: add_lineitems_to_cart.

Why did this go in the Orders model instead of the Store controller
(where we were just saving the cart to the database)?


Austin G.
Thinking & Making: IA, UX, and IxD
[email protected]

Hi Austin,

Check out this article by Jamis B., I think he explains it well why
it’s better to have models pulling as much of their weight as they


Tim C.

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