1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-08 07:22:38 +00:00

Trying to get create wrestler for school link to work

This commit is contained in:
Jacob Cody Wimer
2014-01-07 13:17:40 -05:00
parent e27c29d313
commit 898caee2a6
3 changed files with 16 additions and 6 deletions

View File

@@ -16,6 +16,9 @@
<br>
<br>
<%= link_to "New #{@school.name} Wrestler" , new_wrestler_path(@school) %>
<br> <br>
<br> <br>

View File

@@ -15,10 +15,13 @@
<%= f.label :name %><br> <%= f.label :name %><br>
<%= f.text_field :name %> <%= f.text_field :name %>
</div> </div>
<div class="field">
<%= f.label 'School' %><br>
<%= f.collection_select :school_id, School.all, :id, :name %> <div class="field">
</div> <%= f.label 'School' %><br>
<%= f.collection_select :school_id, School.all, :id, :name %>
</div>
<div class="field"> <div class="field">
<%= f.label 'Weight Class' %><br> <%= f.label 'Weight Class' %><br>
<%= f.collection_select :weight_id, Weight.all, :id, :max %> <%= f.collection_select :weight_id, Weight.all, :id, :max %>

View File

@@ -1,9 +1,13 @@
Wrestling::Application.routes.draw do Wrestling::Application.routes.draw do
resources :wrestlers resources :schools
resources :weights resources :weights
resources :schools resources :wrestlers
# The priority is based upon order of creation: first created -> highest priority. # The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes". # See how all your routes lay out with "rake routes".