Exemplo tirar do RailsCast: http://railscasts.com/episodes/405-angularjs?autoplay=true