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

Fixed indentations

This commit is contained in:
2015-12-31 17:31:32 +00:00
parent c9ff63548b
commit 669b026795

View File

@@ -63,13 +63,13 @@ class WeightsController < ApplicationController
# DELETE /weights/1.json
def destroy
@tournament = Tournament.find(@weight.tournament_id)
if current_user != @tournament.user
redirect_to root_path
if current_user != @tournament.user
redirect_to root_path
end
@weight.destroy
respond_to do |format|
format.html { redirect_to @tournament }
format.json { head :no_content }
format.html { redirect_to @tournament }
format.json { head :no_content }
end
end
@@ -83,18 +83,18 @@ class WeightsController < ApplicationController
def weight_params
params.require(:weight).permit(:max, :tournament_id, :mat_id)
end
def check_access
if params[:tournament]
@tournament = Tournament.find(params[:tournament])
elsif params[:weight]
@tournament = Tournament.find(params[:weight]["tournament_id"])
elsif @weight
@tournament = @weight.tournament
end
if current_user != @tournament.user
redirect_to '/static_pages/not_allowed'
end
end
def check_access
if params[:tournament]
@tournament = Tournament.find(params[:tournament])
elsif params[:weight]
@tournament = Tournament.find(params[:weight]["tournament_id"])
elsif @weight
@tournament = @weight.tournament
end
if current_user != @tournament.user
redirect_to '/static_pages/not_allowed'
end
end
end