Episodes tagged with “refactoring”
-
286
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.
Tags: views plugins refactoring
-
275
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.
Tags: testing refactoring
-
212
Refactoring & Dynamic Delegator Other translations:
Learn how to refactor a set of conditional Active Record queries using a Dynamic Delegator.
Tags: refactoring active-record rails-30
-
30
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.
Tags: views refactoring
-
12
Refactoring User Name Part 3 Other translations:
In the final part of the episodes on testing and refactoring we'll refactor our test code.
Tags: refactoring testing
-
11
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.
Tags: refactoring testing
-
10
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.
Tags: refactoring