summaryrefslogtreecommitdiff
path: root/app/models/match.rb
blob: c2df6e001342f49f378f2461eb5c9f58567427fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class Match < ActiveRecord::Base
	belongs_to :tournament_stage
	has_many :statistics
	has_and_belongs_to_many :teams

	belongs_to :winner, class_name: "Team"

	def win?(player)
		winner.players.include? player
	end

	def handle_sampling(params)
		# TODO
	end

	def render_sampling(user)
		# TODO
	end

	def finished?
		# TODO
	end
end