Permalink
Browse files

Document ActiveRecord::Base.configurations.

  • Loading branch information...
1 parent 6941c98 commit d0f7ec35a6a5f3bd80d682517fbb526b7e475f65 @FooBarWidget FooBarWidget committed Sep 17, 2008
Showing with 25 additions and 0 deletions.
  1. +25 −0 activerecord/lib/active_record/base.rb
@@ -415,6 +415,31 @@ def self.reset_subclasses #:nodoc:
@@subclasses = {}
+ # 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'
+ # }
+ # }
cattr_accessor :configurations, :instance_writer => false
@@configurations = {}

0 comments on commit d0f7ec3

Please sign in to comment.