Rails implementation of tictactoe