Skip to content

Commit

Permalink
Add missing #connected? method (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
lorint authored Mar 9, 2024
1 parent 8379352 commit 93f5a0c
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 @@ -220,6 +220,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 93f5a0c

Please sign in to comment.