mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-05 06:07:20 +00:00
Auto creating of high school weights
This commit is contained in:
@@ -67,6 +67,19 @@ class StaticPagesController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def createCustomWeights
|
||||
if user_signed_in?
|
||||
else
|
||||
redirect_to root_path
|
||||
end
|
||||
@tournament = Tournament.find(params[:tournament])
|
||||
@custom = params[:customValue].to_s
|
||||
@tournament.createCustomWeights(@custom)
|
||||
|
||||
redirect_to "/tournaments/#{@tournament.id}"
|
||||
end
|
||||
|
||||
|
||||
def noMatches
|
||||
if params[:tournament]
|
||||
@tournament = Tournament.find(params[:tournament])
|
||||
|
||||
Reference in New Issue
Block a user