diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/matches/_form.html.erb | 15 | ||||
-rw-r--r-- | app/views/matches/index.html.erb | 2 | ||||
-rw-r--r-- | app/views/matches/new.html.erb | 2 |
3 files changed, 4 insertions, 15 deletions
diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb index c5f1ba8..015aed0 100644 --- a/app/views/matches/_form.html.erb +++ b/app/views/matches/_form.html.erb @@ -1,16 +1,5 @@ -<%= form_for(@match) do |f| %> - <% if @match.errors.any? %> - <div id="error_explanation"> - <h2><%= pluralize(@match.errors.count, "error") %> prohibited this match from being saved:</h2> - - <ul> - <% @match.errors.full_messages.each do |msg| %> - <li><%= msg %></li> - <% end %> - </ul> - </div> - <% end %> - +<%= form_for([@tournament, @tournament.matches.build]) do |f| %> + <div class="field"> <%= f.label :tournament_id %><br> <%= f.text_field :tournament_id %> diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index 0742770..d258638 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -26,4 +26,4 @@ <br> -<%= link_to 'New Match', new_match_path %> +<%= link_to 'New Match', new_tournament_match_path %> diff --git a/app/views/matches/new.html.erb b/app/views/matches/new.html.erb index bd4c78c..9ac669f 100644 --- a/app/views/matches/new.html.erb +++ b/app/views/matches/new.html.erb @@ -2,4 +2,4 @@ <%= render 'form' %> -<%= link_to 'Back', matches_path %> + |