class Api::ApiController

Public Instance Methods

current_user() click to toggle source
# File lib/stitches/generator_files/app/controllers/api/api_controller.rb, line 19
def current_user
  api_client
end

Protected Instance Methods

api_client() click to toggle source
# File lib/stitches/generator_files/app/controllers/api/api_controller.rb, line 25
def api_client
  @api_client ||= request.env[Stitches.configuration.env_var_to_hold_api_client]
  # Use this if you want to look up the ApiClient instead of using the one placed into the env
  # @api_client ||= ApiClient.find(request.env[Stitches.configuration.env_var_to_hold_api_client_primary_key])
end