jchris (owner)

Fork Of

gist: 15836 by sco initializing couchrest in a...

Revisions

gist: 18187 Download_button fork
public
Public Clone URL: git://gist.github.com/18187.git
Embed All Files: show embed
couchdb.yml #
1
2
3
4
5
6
7
8
---
development: &defaults
  :url: http://0.0.0.0:5984/gathering
 
production: &production
  <<: *defaults
  :url: http://0.0.0.0:5984/gathering
 
init.rb #
1
2
3
COUCHDB_CONFIG = Erubis.load_yaml_file(Merb.root / "config" / "couchdb.yml")[Merb.environment]
COUCH = CouchRest.database!(COUCHDB_CONFIG[:url])
CouchRest::Model.default_database = COUCH