Episodes tagged with “refactoring”
Draper Other translations:
Clean up complex view logic using Draper. This gem provides decorators (much like presenters) which bundles view logic in an object oriented fashion. In this episode we do a step-by-step refactoring of a complex template into a decorator.
How I Test Other translations:
Here we show how we would add tests to the password reset feature created in the previous episode. We use RSpec, Capybara, Factory Girl, and Guard to make request, model, and mailer specs.
Refactoring & Dynamic Delegator Other translations:
Learn how to refactor a set of conditional Active Record queries using a Dynamic Delegator.
Pretty Page Title Other translations:
It's easy to avoid giving each page in your Rails applications its own title. Here we'll show you an easy way to do it.
Refactoring User Name Part 3 Other translations:
In the final part of the episodes on testing and refactoring we'll refactor our test code.
Refactoring User Name Part 2 Other translations:
Having moved code from the view to the model in part one, we'll refactor it and write some tests to make sure it all still works as expected.
Refactoring User Name Part 1 Other translations:
This episode will show you how to move code from the view into the model to reduce duplication and clean up the view.