Code from Crafting Rails 4 Applications