1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Swap wrestlers moved from edit wrestler to the bracket page

This commit is contained in:
2017-01-31 13:43:56 +00:00
parent bb30b0f916
commit b5d07e103e
3 changed files with 19 additions and 14 deletions

View File

@@ -13,7 +13,7 @@ class TournamentsController < ApplicationController
@wrestler = Wrestler.find(params[:wrestler][:originalId])
respond_to do |format|
if SwapWrestlers.new.swapWrestlers(params[:wrestler][:originalId], params[:wrestler][:swapId])
format.html { redirect_to @wrestler, notice: 'Wrestler was successfully swaped.' }
format.html { redirect_to "/tournaments/#{@wrestler.tournament.id}/brackets/#{@wrestler.weight.id}", notice: 'Wrestler was successfully swaped.' }
format.json { render action: 'show', status: :created, location: @wrestler }
end
end