diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/game_setting.rb | 13 | ||||
-rw-r--r-- | app/models/tournament_setting.rb | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/app/models/game_setting.rb b/app/models/game_setting.rb index bff8d97..e701cae 100644 --- a/app/models/game_setting.rb +++ b/app/models/game_setting.rb @@ -1,3 +1,16 @@ class GameSetting < ActiveRecord::Base belongs_to :game + + alias_attribute :value, :default + + def self.types + return { + :text_short => 0, + :text_long => 1, + :pick_one_radio => 2, + :pick_several => 3, + :true_false => 4, + :pick_one_dropdown => 5, + } + end end diff --git a/app/models/tournament_setting.rb b/app/models/tournament_setting.rb index b3e6ace..9efaaea 100644 --- a/app/models/tournament_setting.rb +++ b/app/models/tournament_setting.rb @@ -1,3 +1,7 @@ class TournamentSetting < ActiveRecord::Base belongs_to :tournament + + def self.types + GameSetting.types + end end |