Sha256: d7927f7dd9e3ae9c062b26a88397225ddf8ed8d4d9dac8d76c1c5de8b5334b72

Contents?: true

Size: 196 Bytes

Versions: 5

Compression:

Stored size: 196 Bytes

Contents

# frozen_string_literal: true

module TPHealthcheck::DataBaseHelper
  def database_on?
    return true if Gem.loaded_specs['activerecord'].nil?
    ActiveRecord::Base.connection.active?
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tp_healthcheck-0.1.4 app/helper/tp_healthcheck/data_base_helper.rb
tp_healthcheck-0.1.3 app/helper/tp_healthcheck/data_base_helper.rb
tp_healthcheck-0.1.2 app/helper/tp_healthcheck/data_base_helper.rb
tp_healthcheck-0.1.1 app/helper/tp_healthcheck/data_base_helper.rb
tp_healthcheck-0.1.0 app/helper/tp_healthcheck/data_base_helper.rb