Class: Carbonyte::ApplicationController

Inherits:
ActionController::API
  • Object
show all
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

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

#remote_ip

Methods included from Concerns::Correlatable

#correlation_id

Instance Method Details

#healthObject

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