diff options
author | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-09-17 15:17:32 +0200 |
---|---|---|
committer | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-09-17 15:17:32 +0200 |
commit | d0f7ec35a6a5f3bd80d682517fbb526b7e475f65 (patch) | |
tree | ecc5443295b51847c99853916ebab587db2c6644 /activerecord | |
parent | 6941c98ec93a0f7427e54c40ce3a3309d04d61ca (diff) | |
download | rails-d0f7ec35a6a5f3bd80d682517fbb526b7e475f65.tar.gz rails-d0f7ec35a6a5f3bd80d682517fbb526b7e475f65.tar.bz2 rails-d0f7ec35a6a5f3bd80d682517fbb526b7e475f65.zip |
Document ActiveRecord::Base.configurations.
Diffstat (limited to 'activerecord')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index a925ba6e20..556f9f115b 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -415,6 +415,31 @@ module ActiveRecord #: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 = {} |