diff options
author | guntasgrewal <guntasgrewal@gmail.com> | 2014-04-07 01:26:49 -0400 |
---|---|---|
committer | guntasgrewal <guntasgrewal@gmail.com> | 2014-04-07 01:26:49 -0400 |
commit | 366244bec2d0aa0c395949efadc0a6f714547aa1 (patch) | |
tree | c0cbb072b0394376a5f272aca9af191078bb702b /app/views/tournaments/_selected.html.erb | |
parent | eaa0539a0413578cc0815cda46d7dc2567ed28bd (diff) | |
parent | f6412084d6aafe51a5da6ca31b5f1e79f2ca0029 (diff) |
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'app/views/tournaments/_selected.html.erb')
-rw-r--r-- | app/views/tournaments/_selected.html.erb | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/app/views/tournaments/_selected.html.erb b/app/views/tournaments/_selected.html.erb index b66acb0..d37c741 100644 --- a/app/views/tournaments/_selected.html.erb +++ b/app/views/tournaments/_selected.html.erb @@ -17,5 +17,24 @@ </p> <% end %> - <%= f.submit %> + <%= fields_for "tournament[preferences]", @tournament.preferences do |setting_fields| %> + <% @game.settings.each do |setting| %> + <% case setting.stype %> + <% when 0 %> + <%= setting_fields.text_field( setting.name, :name ) %> + <% when 1 %> + <%= setting_fields.text_area( setting.name, setting.name ) %> + <% when 2 %> + <%= setting_fields.collection_radio_buttons( setting.name, setting.type_opt.split(',') ) %> + <% when 3 %> + <%= setting_fields.collection_check_boxes( setting.name, setting.type_opt.split(',') ) %> + <% when 4 %> + <%= setting_fields.radio_button( setting.name, "true" ) %> + <%= setting_fields.radio_button( setting.name, "false" ) %> + <% when 5 %> + <%= setting_fields.select( setting.name, setting.type_opt.split(',') ) %> + <% end %> + <% end %> + <% end %> + <%= f.submit %> <% end %> |