1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-06 22:44:14 +00:00

Added a stats page for teams

This commit is contained in:
2017-12-18 07:51:38 -05:00
parent 7831bfaf6b
commit d88000f06a
5 changed files with 58 additions and 19 deletions

View File

@@ -1,9 +1,13 @@
class SchoolsController < ApplicationController
before_action :set_school, only: [:show, :edit, :update, :destroy]
before_action :set_school, only: [:show, :edit, :update, :destroy, :stats]
before_action :check_access_director, only: [:new,:create,:destroy]
before_action :check_access_delegate, only: [:update,:edit]
def stats
@tournament = @school.tournament
end
# GET /schools/1
# GET /schools/1.json
def show
@@ -89,7 +93,7 @@ class SchoolsController < ApplicationController
end
authorize! :manage, @tournament
end
def check_access_delegate
authorize! :manage, @school
end