Some codes from Ruby on Rails book by Casa do Código - Caelum