Class: Carbonyte::ApplicationController
- Inherits:
-
ActionController::API
- Object
- ActionController::API
- Carbonyte::ApplicationController
- Includes:
- Concerns::Correlatable, Concerns::Loggable, Concerns::Policiable, Concerns::Rescuable, Concerns::Serializable
- Defined in:
- app/controllers/carbonyte/application_controller.rb
Overview
Carbonyte base class for all controllers
Instance Method Summary collapse
-
#health ⇒ Object
GET /health.
Methods included from Concerns::Serializable
#include_option, #serialize, #serializer_options
Methods included from Concerns::Rescuable
#rescue_with_handler, #route_not_found
Methods included from Concerns::Loggable
Methods included from Concerns::Correlatable
Instance Method Details
#health ⇒ Object
GET /health
13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/carbonyte/application_controller.rb', line 13 def health payload = { correlation_id: correlation_id, db_status: ActiveRecord::Base.connected? ? 'OK' : 'Not Connected', environment: Rails.env, pid: ::Process.pid } render json: payload, status: :ok end |