Skip to content

Instantly share code, notes, and snippets.

@sco
Created October 9, 2008 18:17
Show Gist options
  • Save sco/15836 to your computer and use it in GitHub Desktop.
Save sco/15836 to your computer and use it in GitHub Desktop.
initializing couchrest in a merb app
---
development: &defaults
:url: http://0.0.0.0:5984/gathering
production: &production
<<: *defaults
:url: http://0.0.0.0:5984/gathering
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