Showing 6 videos tagged with refactor

Railscast - Episode 4: Move Find into Model

00:02:03 railscasts.com
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.

Railscast - Episode 10: Refactoring User Name Part 1

00:05:44 railscasts.com
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.

Railscast - Episode 11: Refactoring User Name Part 2

00:06:34 railscasts.com
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.

Railscast - Episode 12: Refactoring User Name Part 3

00:04:03 railscasts.com
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.

Railscast - Episode 91: Refactoring Long Methods

00:07:29 railscasts.com
In this episode I walk you through an exercise in refactoring by taking a long method and making it more concise.

Railscast - Episode 101: Refactoring Out Helper Object

00:07:25 railscasts.com
If you have complex view logic, this can easily lead to helper methods which call each other. See how to refactor this out into another object in this episode.