Module: Authorize::ActionController
- Defined in:
- lib/authorize/action_controller.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
Class Method Details
.included(recipient) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/authorize/action_controller.rb', line 3 def self.included(recipient) if recipient.respond_to?(:rescue_responses) recipient.rescue_responses['Authorize::AuthorizationError'] = :forbidden end recipient.extend(ClassMethods) recipient.class_eval do include InstanceMethods helper_method :permit? helper_method :permit helper_method :handle_authorization_failure end end |