Fix nil argument bug
This commit is contained in:
parent
8685196ce9
commit
753acd9aee
@ -25,6 +25,7 @@ class User < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def stand_from(table)
|
def stand_from(table)
|
||||||
|
return if table == nil
|
||||||
@seats = []
|
@seats = []
|
||||||
if self.id
|
if self.id
|
||||||
@seats << table.seats.where(user_id: self.id)
|
@seats << table.seats.where(user_id: self.id)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user