Spec-Zone.ru › Ruby on Rails 7.2

класс ActiveRecord::DatabaseConnectionError

Родитель:
ActiveRecord::ConnectionNotEstablished

Вызывается, когда подключение к базе данных не удалось установить, так как не удалось подключиться к хосту или произошел отказ в авторизации.

Публичные методы класса

hostname_error(hostname) Показать исходный код
# File activerecord/lib/active_record/errors.rb, line 95
      def hostname_error(hostname)
        DatabaseConnectionError.new(<<~MSG)
          There is an issue connecting with your hostname: #{hostname}.\n
          Please check your database configuration and ensure there is a valid connection to your database.
        MSG
      end
new(message = nil) Показать исходный код
# File activerecord/lib/active_record/errors.rb, line 90
def initialize(message = nil)
  super(message || "Database connection error")
end
Вызывает метод суперкласса ActiveRecord::ConnectionNotEstablished::new
username_error(username) Показать исходный код
# File activerecord/lib/active_record/errors.rb, line 102
      def username_error(username)
        DatabaseConnectionError.new(<<~MSG)
          There is an issue connecting to your database with your username/password, username: #{username}.\n
          Please check your database configuration to ensure the username/password are valid.
        MSG
      end

© 2004–2021 David Heinemeier Hansson
Licensed under the MIT License.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API