Module: Mighost::Base
- Defined in:
- lib/mighost.rb
Overview
Mirrors ActiveRecord::Base.connection with Rails 6.1–8.1 compatibility. Usage: Mighost::Base.connection
Class Method Summary collapse
Class Method Details
.connection ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/mighost.rb', line 43 def self.connection if ActiveRecord::Base.respond_to?(:lease_connection) ActiveRecord::Base.lease_connection else ActiveRecord::Base.connection end end |