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.

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



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

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