Game of battleships in Rails