Sample refactoring of Rails application
We all know we're not SUPPOSED to cram everything into 1 or 2 controllers or write 37-line methods. And we SHOULD move all model code (e.g., find) into the model classes and keep business logic out of the views. Can you start with a typical newbie Rails application (multiple models, big enough to be interesting) and show how to refactor it? Add tests or RSpecs? ---Jim Gagne---
6
votes