6 lines
155 B
Ruby

class Table < ActiveRecord::Base
has_many :seats
has_many :games
has_one :current_game, :class_name => "Game", :primary_key => "current_game_id"
end