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

Added button to generate matches

This commit is contained in:
2015-05-26 17:53:53 +00:00
parent e62fb1a514
commit 81f233cb0e
4 changed files with 24 additions and 0 deletions

View File

@@ -85,4 +85,17 @@ class StaticPagesController < ApplicationController
@tournament = Tournament.find(params[:tournament])
end
end
def generate_matches
if user_signed_in?
else
redirect_to root_path
end
if params[:tournament]
@tournament = Tournament.find(params[:tournament])
end
if @tournament
@tournament.generateMatchups
end
end
end