Class: Apicasso::ApplicationController

Inherits:
ActionController::API
  • Object
show all
Includes:
ActionController::HttpAuthentication::Token::ControllerMethods
Defined in:
app/controllers/apicasso/application_controller.rb

Overview

Controller to extract common API features, such as authentication and authorization. Used to be inherited by non-CRUD controllers when your application needs to create custom actions.

Direct Known Subclasses

ApidocsController, CrudController

Instance Method Summary collapse

Instance Method Details

#current_abilityObject

Sets the authorization scope for the current API key, it's a getter to make scoping easier



15
16
17
# File 'app/controllers/apicasso/application_controller.rb', line 15

def current_ability
  @current_ability ||= Apicasso::Ability.new(@api_key)
end