Skip to content

Instantly share code, notes, and snippets.

@shenoudab
Created September 8, 2010 12:28
Show Gist options
  • 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:[email protected]: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