class

ActiveRecord::DatabaseConfigurations

rails latest stable - Superclass: Object

Active Record Database Configurations

+ActiveRecord::DatabaseConfigurations+ returns an array of DatabaseConfig objects that are constructed from the application’s database configuration hash or URL string.

The array of DatabaseConfig objects in an application default to either a HashConfig or UrlConfig. You can retrieve your application’s config by using ActiveRecord::Base.configurations.

If you register a custom handler, objects will be created according to the conditions of the handler. See ::register_db_config_handler for more on registering custom handlers.

Attributes

[R]configurations
[RW]db_config_handlers

Files

  • activerecord/lib/active_record/database_configurations.rb
  • activerecord/lib/active_record/database_configurations/connection_url_resolver.rb
  • activerecord/lib/active_record/database_configurations/database_config.rb
  • activerecord/lib/active_record/database_configurations/hash_config.rb
  • activerecord/lib/active_record/database_configurations/url_config.rb