A really great talk by Sandi Metz in which she refactors a nasty block of conditional code to a few small, understandable objects.

https://www.youtube.com/watch?v=8bZh5LMaSmE