Created
October 9, 2008 18:17
-
-
Save sco/15836 to your computer and use it in GitHub Desktop.
initializing couchrest in a merb app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
development: &defaults | |
:url: http://0.0.0.0:5984/gathering | |
production: &production | |
<<: *defaults | |
:url: http://0.0.0.0:5984/gathering |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COUCHDB_CONFIG = Erubis.load_yaml_file(Merb.root / "config" / "couchdb.yml")[Merb.environment] | |
COUCH = CouchRest.database!(COUCHDB_CONFIG[:url]) | |
CouchRest::Model.default_database = COUCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment