instance method reconnect

Ruby on Rails 8.1.2

Since v7.1.6 Private

Available in: v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

reconnect()

No documentation comment.

Source
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 965
        def reconnect
          begin
            @raw_connection&.reset
          rescue PG::ConnectionBad
            @raw_connection = nil
          end

          connect unless @raw_connection
        end

Defined in activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb line 965 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ConnectionAdapters::PostgreSQLAdapter

Type at least 2 characters to search.

↑↓ navigate · open · esc close