Module: CanCanNamespace::ControllerResource::InstanceMethods

Defined in:
lib/cancan_namespace/controller_resource.rb

Instance Method Summary collapse

Instance Method Details

#authorize_resource_with_contextObject



19
20
21
22
23
24
# File 'lib/cancan_namespace/controller_resource.rb', line 19

def authorize_resource_with_context
  unless skip?(:authorize)
    options = { :context => (@options[:context] || module_from_controller) }
    @controller.authorize!(authorization_action, resource_instance || resource_class_with_parent, options)
  end
end