diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-06 19:56:33 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-06 19:56:33 -0500 |
commit | a1700f50ee800cfbfb93bd7dfff7b5d79ae2cb2f (patch) | |
tree | c9db0b8bdd4818f5ce2ff982657e2aedfda98f8f /app/views/tournaments/_selected.html.erb | |
parent | 706392b7c4520382ddd8f827b31205c6b71f5320 (diff) | |
parent | 63830b0f939db5f6911218950525428420c4d467 (diff) |
Merge branch 'master2'
Conflicts:
app/controllers/tournaments_controller.rb
app/models/tournament.rb
app/views/tournaments/_selected.html.erb
app/views/tournaments/new.html.erb
config/routes.rb
Diffstat (limited to 'app/views/tournaments/_selected.html.erb')
-rw-r--r-- | app/views/tournaments/_selected.html.erb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/app/views/tournaments/_selected.html.erb b/app/views/tournaments/_selected.html.erb index 551dc40..9b1b7f8 100644 --- a/app/views/tournaments/_selected.html.erb +++ b/app/views/tournaments/_selected.html.erb @@ -2,14 +2,21 @@ <%= render "common/error_messages", :target => @tournament %> <%= f.hidden_field(:game_id) %> + <% @chosen = Game.find_by(params[:game]) %> <% @tournament.attributes.each do |name, value| %> - <% if (name == "id") or (name =~ /.*_at$/) %> + <% if (name == "id") or (name =~ /.*_at$/) or (name == "game_id") or (name == "status") %> <% next %> <% end %> <p> - <%= f.label name %><br> - <%= f.text_field name %> + <%= f.label name %><br> + <% if !@chosen.attributes[name].nil? %> + <%= f.text_field(name, :value => @chosen.attributes[name] ) %> + <% else %> + <%= f.text_field name %> + <% end %> + </p> + <% end %> <%= f.submit %> <% end %> |