Created
September 8, 2010 12:28
-
-
Save shenoudab/570055 to your computer and use it in GitHub Desktop.
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
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