Fixing find(blank) issue

This commit is contained in:
Sam Lown 2010-09-05 20:06:44 +02:00
parent 31770ba571
commit 5c21de8586
3 changed files with 16 additions and 2 deletions

View file

@ -70,6 +70,7 @@ module CouchRest
# id<String, Integer>:: Document ID
# db<Database>:: optional option to pass a custom database to use
def get!(id, db = database)
raise "Missing or empty document ID" if id.to_s.empty?
doc = db.get id
create_from_database(doc)
end