跳轉至內容 跳轉至搜尋

當連接至資料庫時無法建立連線時發生 (例如當 ActiveRecord::Base.lease_connection= 有一個 nil 物件)。

手法
N
S

類別公開手法

new(message = nil, connection_pool: nil)

# File activerecord/lib/active_record/errors.rb, line 68
def initialize(message = nil, connection_pool: nil)
  super(message, connection_pool: connection_pool)
end

個體公開手法

set_pool(connection_pool)

# File activerecord/lib/active_record/errors.rb, line 72
def set_pool(connection_pool)
  unless @connection_pool
    @connection_pool = connection_pool
  end

  self
end