Module: Authority::Controller
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/authority/controller.rb
Overview
Gets included into the app’s controllers automatically by the railtie
Defined Under Namespace
Modules: ClassMethods Classes: MissingAction
Class Method Summary collapse
Class Method Details
.security_violation_callback ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/authority/controller.rb', line 12 def self.security_violation_callback Proc.new do |exception| # Through the magic of ActiveSupport's `Proc#bind`, `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 |