diff --git a/app/controllers/weights_controller.rb b/app/controllers/weights_controller.rb index fc45ea7..065744f 100644 --- a/app/controllers/weights_controller.rb +++ b/app/controllers/weights_controller.rb @@ -10,8 +10,12 @@ class WeightsController < ApplicationController # GET /weights/1 # GET /weights/1.json def show + if params[:wrestler] + Wrestler.update(params[:wrestler].keys, params[:wrestler].values) + end @wrestlers = Wrestler.all @tournament = Tournament.find(@weight.tournament_id) + end # GET /weights/new diff --git a/app/views/weights/show.html.erb b/app/views/weights/show.html.erb index f3823a2..11a22d4 100644 --- a/app/views/weights/show.html.erb +++ b/app/views/weights/show.html.erb @@ -23,6 +23,7 @@
+ <%= form_tag @wrestlers_update_path do %> <% @wrestlers.order("original_seed asc").each do |wrestler| %> <% if wrestler.weight_id == @weight.id %>