Reusing database.yml Sections
In order to reuse database.yml sections for your database connection information, you can do the following in your database.yml file.
Notice the use of &development which creates a tag which can be referenced later within your database.yml file.
development: &development adapter: sqlite3 database: db/development.sqlite3 production: <<: *development
You can also do something like this, which assigns the &login tag which is later referenced within the development section:
login: &login username: myusername password: mypassword development: adapter: mysql host: localhost database: development_db <<: *login