Class: ApiController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ApiController
- Includes:
- DomainController
- Defined in:
- app/controllers/api_controller.rb
Direct Known Subclasses
Instance Method Summary collapse
- #clear_session ⇒ Object
- #offline ⇒ Object
- #protect_against_forgery? ⇒ Boolean
- #respond_error(exception) ⇒ Object
Instance Method Details
#clear_session ⇒ Object
9 10 11 12 |
# File 'app/controllers/api_controller.rb', line 9 def clear_session session.clear request.[:skip] = true end |
#offline ⇒ Object
25 26 27 28 29 30 31 |
# File 'app/controllers/api_controller.rb', line 25 def offline = Preference.get_cached(_sid, "down_for_maintenance_message") if head :service_unavailable, :message=> return false end end |
#protect_against_forgery? ⇒ Boolean
14 15 |
# File 'app/controllers/api_controller.rb', line 14 def protect_against_forgery? end |
#respond_error(exception) ⇒ Object
19 20 21 22 23 |
# File 'app/controllers/api_controller.rb', line 19 def respond_error(exception) head :internal_server_error logger.error exception. end |