Blog
Better sanity checking in Rails
Posted by Gareth Adams on February 12, 2010
When you’re building a web application, Rails does a load of the heavy lifting for you. Many of the core philosophies of Rails are aimed around only implementing functionality in the place it makes sense.
This turns out to be a great idea for readability, and with practice – and thoughtful naming – it isn’t too difficult to keep your code clean enough that you can see at a glance what it does. You can get to the point where your controller code just gives a high-level overview of what the code does, and leaves all the details to the models and other modules.
Lots of the tools in a Rails developer’s toolbox are commonly known, but there are a couple of useful ones that are newer and haven’t been picked up on as much.