Fix active player id list
This commit is contained in:
parent
c9c136f3f1
commit
8a8f324fac
@ -136,7 +136,7 @@ class Game < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def player_ids_by_seat_order
|
||||
player_ids = self.seats.order(:position).select {|s| ( s.player.inventory.count > 0) ? s.player_id : nil}.compact.map {|s| s.player_id}
|
||||
player_ids = self.seats.order(:position).select {|s| ( s.player.present? && s.player.inventory.count > 0) ? s.player_id : nil}.compact.map {|s| s.player_id}
|
||||
end
|
||||
|
||||
def next_player_id
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user