Help Grokking Controllers (It's not as gross as it sounds.)
August 25, 2007 9:18 AM
Subscribe
Looking for guidelines, principles, etc. for grokking the decision process for splitting up a Ruby on Rails application into controllers.
So, I'm learning Ruby on Rails. I get the model and view part of MVC quite well. But the controller aspect still eludes me some. When I watch various screencasts and read the Agile book, the decisions make sense to me, but when I start to create an application, the decisions about controllers aren't as readily apparent to me.
So, how do you think about controllers when you are developing an application in Ruby on Rails? What sort of guidelines or cues do you keep in mind that make you know you should create a new controller as opposed to a new action in an existing controller?
I hope that makes sense. My ability to express the question cogently clearly corresponds to and confirms my uncertainty.
posted by jxpx777 to computers & internet (4 comments total)
Models should hold business logic, like "find_all_open_orders", rather than just calling "find_orders" and then looping over it to find open ones.
posted by cschneid at 10:52 AM on August 25, 2007