diff --git a/app/views/schools/show.html.erb b/app/views/schools/show.html.erb index dcdd7ee..2386ccf 100644 --- a/app/views/schools/show.html.erb +++ b/app/views/schools/show.html.erb @@ -16,6 +16,9 @@ +
+
+<%= link_to "New #{@school.name} Wrestler" , new_wrestler_path(@school) %>

diff --git a/app/views/wrestlers/_form.html.erb b/app/views/wrestlers/_form.html.erb index c1bb33d..f1e2893 100644 --- a/app/views/wrestlers/_form.html.erb +++ b/app/views/wrestlers/_form.html.erb @@ -15,10 +15,13 @@ <%= f.label :name %>
<%= f.text_field :name %> -
- <%= f.label 'School' %>
- <%= f.collection_select :school_id, School.all, :id, :name %> -
+ + +
+ <%= f.label 'School' %>
+ <%= f.collection_select :school_id, School.all, :id, :name %> +
+
<%= f.label 'Weight Class' %>
<%= f.collection_select :weight_id, Weight.all, :id, :max %> diff --git a/config/routes.rb b/config/routes.rb index f48894b..69300d3 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,9 +1,13 @@ Wrestling::Application.routes.draw do - resources :wrestlers + resources :schools resources :weights - resources :schools + resources :wrestlers + + + + # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes".