Class: Compass::ApplicationController
- Inherits:
-
ActionController::API
- Object
- ActionController::API
- Compass::ApplicationController
show all
- Defined in:
- app/controllers/compass/application_controller.rb
Overview
Instance Method Summary
collapse
Instance Method Details
#authenticate ⇒ Object
9
10
11
|
# File 'app/controllers/compass/application_controller.rb', line 9
def authenticate
head(:forbidden) unless current_context.authenticate!
end
|
#current_context ⇒ Object
17
18
19
20
|
# File 'app/controllers/compass/application_controller.rb', line 17
def current_context
Compass::Context.from(request.env)
end
|
#validate_context ⇒ Object
13
14
15
|
# File 'app/controllers/compass/application_controller.rb', line 13
def validate_context
head(:bad_request) unless current_context.context_id.to_s.eql?(params[:context_id])
end
|