Coding from the book Crafting Rails 4 Applications from Jose Valim