diff --git a/app/controllers/wrestlers_controller.rb b/app/controllers/wrestlers_controller.rb index 2a6caa8..e83a7c6 100644 --- a/app/controllers/wrestlers_controller.rb +++ b/app/controllers/wrestlers_controller.rb @@ -31,6 +31,7 @@ class WrestlersController < ApplicationController def edit @weight = @wrestler.weight @weights = @school.tournament.weights.sort_by{|w| w.max} + @school = @wrestler.school end # POST /wrestlers diff --git a/app/views/wrestlers/_form.html.erb b/app/views/wrestlers/_form.html.erb index b827403..bb1a141 100644 --- a/app/views/wrestlers/_form.html.erb +++ b/app/views/wrestlers/_form.html.erb @@ -17,14 +17,12 @@ <%= f.text_field :name %> <% if can? :manage, @wrestler.tournament %> - <% if @tournament %> - <%= f.hidden_field :school_id, :value => @school.id %> - <% else %>