Module: Authorize::ActionController::ClassMethods

Defined in:
lib/authorize/action_controller.rb

Instance Method Summary collapse

Instance Method Details

#permit(authorization_expression, options = {}) ⇒ Object

Allow action-level authorization check with an appended before_filter.



18
19
20
21
22
23
# File 'lib/authorize/action_controller.rb', line 18

def permit(authorization_expression, options = {})
  auth_options = options.slice!(:only, :except)
  append_before_filter(options) do |controller|
    controller.permit(authorization_expression, auth_options)
  end
end