diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2014-04-23 13:08:14 -0400 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2014-04-23 13:08:14 -0400 |
commit | 8634fa265d74e60790140b90e6bbf2588b96dbf3 (patch) | |
tree | 1ccf860f92abbfbe5e79e562edaf0b394593c01b /app | |
parent | bf25ee5407f6101c1f60de8fa96d248e02802131 (diff) | |
parent | b6d146624b6d3e78c24d3bade5eb558f0a9f626b (diff) |
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'app')
-rw-r--r-- | app/models/game.rb | 2 | ||||
-rw-r--r-- | app/views/tournaments/_selected.html.erb | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/models/game.rb b/app/models/game.rb index ec865d8..345877e 100644 --- a/app/models/game.rb +++ b/app/models/game.rb @@ -1,3 +1,3 @@ class Game < ActiveRecord::Base - has_many :settings, class_name: "GameSetting" + has_many :settings, class_name: "GameSetting" end diff --git a/app/views/tournaments/_selected.html.erb b/app/views/tournaments/_selected.html.erb index a4efa4f..7f0cf81 100644 --- a/app/views/tournaments/_selected.html.erb +++ b/app/views/tournaments/_selected.html.erb @@ -9,8 +9,12 @@ <% end %> <p> <%= f.label name %><br> - <% if !@game.attributes[name].nil? %> + <% unless @game.attributes[name].nil? %> + <% if name == "sampling_method" %> + <%= f.select( name, @game.sampling_method.split(',') ) %> + <% else %> <%= f.text_field(name, :value => @game.attributes[name] ) %> + <% end %> <% else %> <%= f.text_field name %> <% end %> |