TicTacToe in Javascript. On Rails