mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-02 13:15:27 +00:00
Added a feature to generate uuid links for coaches to submit their school lineups.
This commit is contained in:
@@ -10,14 +10,19 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
rescue_from CanCan::AccessDenied do |exception|
|
||||
# flash[:error] = "Access denied!"
|
||||
redirect_to '/static_pages/not_allowed'
|
||||
end
|
||||
|
||||
|
||||
protected
|
||||
|
||||
# In Rails 4.2 and above
|
||||
def verified_request?
|
||||
super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])
|
||||
end
|
||||
|
||||
# Override current_ability to pass school_permission_key
|
||||
# @school_permission_key needs to be defined on the controller
|
||||
def current_ability
|
||||
@current_ability ||= Ability.new(current_user, @school_permission_key)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user