Find first empty seat
This commit is contained in:
parent
f8af8ed880
commit
b371682c23
@ -5,7 +5,7 @@ class TablesController < ApplicationController
|
||||
|
||||
def play_now
|
||||
# First empty seat
|
||||
@seat = Seat.where(player: nil).first
|
||||
@seat = Seat.where(user_soft_token: nil).first
|
||||
if @seat
|
||||
@seat.sit current_user
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user