Skip to content

Commit

Permalink
Add missing #connected? method
Browse files Browse the repository at this point in the history
  • Loading branch information
lorint committed Oct 2, 2023
1 parent fcae60d commit 324ee20
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/active_record/connection_adapters/trilogy_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ def with_trilogy_connection(materialize_transactions: true, **_kwargs)
end
end

def connected?
!connection.nil?
end

def active?
return false if connection&.closed?

Expand Down

0 comments on commit 324ee20

Please sign in to comment.