module Authority::Controller
Gets included into the app's controllers automatically by the railtie
Attributes
Public Class Methods
security_violation_callback()
click to toggle source
# File lib/authority/controller.rb, line 8 def self.security_violation_callback Proc.new do |exception| # Through the magic of `instance_exec` `ActionController::Base#rescue_from` # can call this proc and make `self` the actual controller instance self.send(Authority.configuration.security_violation_handler, exception) end end