From 734729119cbc31e847fd46609b598573f365bdc4 Mon Sep 17 00:00:00 2001
From: Luke Shumaker
<%= f.label name %>
<%= setting_fields.label setting.name %>
- <% unless @game.attributes[name].nil? %>
+ <% unless @tournament.game.attributes[name].nil? %>
<% if name == "sampling_method" %>
- <%= f.select( name, @game.sampling_method.split(',') ) %>
+ <%= f.select( name, @tournament.game.sampling_method.split(',') ) %>
<% else %>
- <%= f.text_field(name, :value => @game.attributes[name] ) %>
+ <%= f.text_field(name, :value => @tournament.game.attributes[name] ) %>
<% end %>
<% else %>
<%= f.text_field name %>
@@ -22,7 +21,7 @@
<% end %>
<%= fields_for "tournament[settings]", @tournament.settings do |setting_fields| %>
- <% @game.settings.each do |setting| %>
+ <% @tournament.game.settings.each do |setting| %>
diff --git a/app/views/tournaments/new.html.erb b/app/views/tournaments/new.html.erb
index 8c74068..66149fe 100644
--- a/app/views/tournaments/new.html.erb
+++ b/app/views/tournaments/new.html.erb
@@ -1,7 +1,7 @@
New Tournament
<%= form_tag(new_tournament_path, method: "get") do %>
- <%= select_tag('game',
+ <%= select_tag('tournament[game_id]',
options_from_collection_for_select(@games, 'id', 'name', @tournament.game.nil? || @tournament.game.id),
:prompt => "Select a Game Type") %>
<%= submit_tag("Select", :class => "btn btn-success btn-xs") %>
--
cgit v1.2.3-2-g168b
From a729106e956e051818bb2d37f1581f3bf3abcefd Mon Sep 17 00:00:00 2001
From: DavisLWebb
+ <%= label :username %>
+ <%= text_field %>
+
+
+
+