Tictactoe with rails as API and angularjs as client