Based off angular-rails tutorial