diff options
-rw-r--r-- | app/views/tournaments/_selected.html.erb | 2 | ||||
-rw-r--r-- | app/views/tournaments/show.html.erb | 7 | ||||
-rw-r--r-- | db/seeds.rb | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/app/views/tournaments/_selected.html.erb b/app/views/tournaments/_selected.html.erb index 6ba56be..4efd17a 100644 --- a/app/views/tournaments/_selected.html.erb +++ b/app/views/tournaments/_selected.html.erb @@ -37,7 +37,7 @@ <% end %> <% when 3 %> <% setting.type_opt.split(',').each do |option|%> - <%= setting_fields.check_box( setting.name, option ) %> <%= option %> <br> + <%= check_box_tag(setting.name, value = option, checked = false, options = {}) %> <%= option %> <br> <% end %> <% when 4 %> <%# setting_fields.label "true" %> diff --git a/app/views/tournaments/show.html.erb b/app/views/tournaments/show.html.erb index 3f8552e..a5eb46c 100644 --- a/app/views/tournaments/show.html.erb +++ b/app/views/tournaments/show.html.erb @@ -57,6 +57,13 @@ <%= @tournament.sampling_method %> </p> +<% @tournament.settings.each do |setting| %> +<p> + <strong><%= setting.name %></strong> + <%= setting.value %> +</p> +<% end %> + </span> <div > diff --git a/db/seeds.rb b/db/seeds.rb index b8c40df..e0c2800 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -23,7 +23,7 @@ Game.find_by_name("Hearthstone").settings.create(name: "Deck Name", description: Game.find_by_name("Rock, Paper, Scissors").settings.create(name: "Favorite Object", description: "What is your favorite object in RPS?", type_opt: "Rock,Paper,Scissors", vartype: 2, display_order: 2) Game.find_by_name("Rock, Paper, Scissors").settings.create(name: "Lizard, Spock allowed?", description: "Will you allow Lizard and Spock?", vartype: 4, display_order: 1) -Game.find_by_name("Rock, Paper, Scissors").settings.create(name: "Why are those up there even called radio buttons?", description: "Check boxes make sense at least", type_opt: "I do not know.,There is now spoon.,Wow.,Because electricity.,Wat?", vartype: 2, display_order: 3) +Game.find_by_name("Rock, Paper, Scissors").settings.create(name: "Why are those up there even called radio buttons?", description: "Check boxes make sense at least", type_opt: "I do not know.,There is now spoon.,Wow.,Because electricity.,Wat?", vartype: 3, display_order: 3) if Rails.env.development? User.create(name: "Administrator", user_name: "admin", email: "root@localhost.lan", password: "password", password_confirmation: "password", permissions: 0xFFFFFFFF) |