In today’s episode, Patrick Crowley introduces his first Rails plugin titled ActsNaked. It’s an easy way to strip your models and keep them DRY.
Patrick Crowley talks about his newest plugins: Headliner and Styler.
Ryan Felton shows how to use Simple Sidebar plugin to DRY up sidebar content in applications.
Move a find into the model to clean up the controllers and remove duplication. Also see how you can call these custom find methods through an association.
Learn how to clean up your code through refactoring. This episode will show you how to move code from the view into the model to remove duplication and simplify the view.
Testing and refactoring go hand in hand. Refactoring is all about improving code without changing its behavior. Testing is all about making sure you don't change the behavior while you are improving the code.
In the final part of this series you will see how to refactor your tests. Keeping tests clean is important because it will make testing easier to do in the future.
Keep your controllers clean and forms flexible by adding virtual attributes to your model. This very powerful technique allows you to create form fields which may not directly relate to the database.
This episode starts off with a big, messy template. Watch as this code shrinks and becomes more readable while the interface stays the same.