method

configurations

Importance_2
v3.2.13 - Show latest stable - 0 notes - Class: ActiveRecord::Base
configurations public

Contains the database configuration - as is typically stored in config/database.yml - as a Hash.

For example, the following database.yml…

development:
  adapter: sqlite3
  database: db/development.sqlite3

production:
  adapter: sqlite3
  database: db/production.sqlite3

…would result in ActiveRecord::Base.configurations to look like this:

{
   'development' => {
      'adapter'  => 'sqlite3',
      'database' => 'db/development.sqlite3'
   },
   'production' => {
      'adapter'  => 'sqlite3',
      'database' => 'db/production.sqlite3'
   }
}
Show source
Register or log in to add new notes.