Skip to content

Instantly share code, notes, and snippets.

@shenoudab
Created September 8, 2010 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shenoudab/570055 to your computer and use it in GitHub Desktop.
Save shenoudab/570055 to your computer and use it in GitHub Desktop.
model_object.copy_to_db(CouchRest.database!("http://admin:admin@127.0.0.1:5984/db")
# couchrest/document
def copy_to_db(db, bulk = false)
raise ArgumentError, "doc.database required to copy" unless db
#result = db.copy_doc(self, dest)
result = db.save_doc self, bulk
result['ok']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment