From 4aeaf0e41518695c3c6ba3b09025516f67b06a11 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Tue, 22 Apr 2014 11:46:07 -0400 Subject: not exactly sure what's wrong with the labels, but fixed true/false --- app/views/tournaments/_selected.html.erb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/views/tournaments/_selected.html.erb b/app/views/tournaments/_selected.html.erb index eec8b5e..a4efa4f 100644 --- a/app/views/tournaments/_selected.html.erb +++ b/app/views/tournaments/_selected.html.erb @@ -18,21 +18,23 @@ <% end %> <%= fields_for "tournament[settings]", @tournament.settings do |setting_fields| %> - <% @tournament.settings.each do |setting| %> + <% @game.settings.each do |setting| %>

<%= setting_fields.label setting.name %>
- <% case setting.stype %> + <% case setting.vartype %> <% when 0 %> <%= setting_fields.text_field( setting.name ) %> <% when 1 %> <%= setting_fields.text_area( setting.name ) %> <% when 2 %> - <%= setting_fields.collection_radio_buttons( setting.name, setting.type_opt.split(','), :first, :last, { item_wrapper_tag: false } ) %> + <%= setting_fields.collection_radio_buttons( setting.name, setting.type_opt.split(','), "first", "last", { item_wrapper_tag: false } ) %> <% when 3 %> - <%= setting_fields.collection_check_boxes( setting.name, setting.type_opt.split(','), :first, :last, { item_wrapper_tag: false } ) %> + <%= setting_fields.collection_check_boxes( setting.name, setting.type_opt.split(','), "first", "last", { item_wrapper_tag: false } ) %> <% when 4 %> + <%= setting_fields.label "true" %> <%= setting_fields.radio_button( setting.name, "true" ) %> + <%= setting_fields.label "false" %> <%= setting_fields.radio_button( setting.name, "false" ) %> <% when 5 %> <%= setting_fields.select( setting.name, setting.type_opt.split(',') ) %> -- cgit v1.2.3-2-g168b