Find first empty seat

This commit is contained in:
Jesse C. Fisher 2019-10-24 17:03:53 -07:00 committed by Jesse C. Fisher
parent cda8fc178f
commit de11d5e87a

View File

@ -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