diff options
Diffstat (limited to 'app/views/tournaments/_selected.html.erb')
-rw-r--r-- | app/views/tournaments/_selected.html.erb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/views/tournaments/_selected.html.erb b/app/views/tournaments/_selected.html.erb new file mode 100644 index 0000000..925e127 --- /dev/null +++ b/app/views/tournaments/_selected.html.erb @@ -0,0 +1,22 @@ +<%= form_for(@tournament) do |f| %> + <%= 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$/) or (name == "game_id") or (name == "statuss") %> + <% next %> + <% end %> + <p> + <%= 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 %> |