Class: OpenStax::Api::V1::ApiController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- OpenStax::Api::V1::ApiController
show all
- Includes:
- Apipie, Roar, Roar::Rails::ControllerAdditions
- Defined in:
- app/controllers/openstax/api/v1/api_controller.rb
Instance Method Summary
collapse
Methods included from Apipie
included
Methods included from Roar
#render_api_errors, #standard_create, #standard_destroy, #standard_index, #standard_nested_create, #standard_read, #standard_restore, #standard_search, #standard_sort, #standard_update
Instance Method Details
#current_api_user ⇒ Object
44
45
46
|
# File 'app/controllers/openstax/api/v1/api_controller.rb', line 44
def current_api_user
@current_api_user ||= ApiUser.new(doorkeeper_token, lambda { current_session_user })
end
|
#current_application ⇒ Object
48
49
50
|
# File 'app/controllers/openstax/api/v1/api_controller.rb', line 48
def current_application
current_api_user.application
end
|
#current_human_user ⇒ Object
52
53
54
|
# File 'app/controllers/openstax/api/v1/api_controller.rb', line 52
def current_human_user
current_api_user.human_user
end
|
#options ⇒ Object
56
57
58
|
# File 'app/controllers/openstax/api/v1/api_controller.rb', line 56
def options
head :ok
end
|