-
-
Save guitsaru/1051438 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tournament < ActiveRecord::Base | |
include Bracket::Swiss # (OR Bracket::KOTH OR Bracket::SingleElimination etc) | |
end | |
module Bracket | |
module KOTH | |
def self.included(base) | |
base.workflow do | |
# state and events for a king of the hill tournament | |
end | |
end | |
end | |
module Swiss | |
def self.included(base) | |
base.workflow do | |
# state and events for a swiss tournament | |
end | |
end | |
end | |
module SingleElimination | |
def self.included(base) | |
base.workflow do | |
# state and events for a single elimination tournament | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment