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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user