Skip to content

Instantly share code, notes, and snippets.

@Keoven
Created May 29, 2011 04:22
Show Gist options
  • Save Keoven/997461 to your computer and use it in GitHub Desktop.
Save Keoven/997461 to your computer and use it in GitHub Desktop.
Rails Database Config File
<% branch = `git branch | grep "*"`.sub('*', '').strip %>
common: &common
adapter: postgresql
username:
password:
host: localhost
development:
database: cp_<%= branch %>_development
<<: *common
production:
database: cp_<%= branch %>_production
<<: *common
test: &test
database: cp_<%= branch %>_test
adapter: postgresql
username:
password:
host: localhost
cucumber:
<<: *test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment