Permalink
Browse files

Use extended get for #find_by_id

Change-Id: I8dcb0b9a694a8cfec2ce83372e444b9e44f232ae
Reviewed-on: http://review.couchbase.org/21772
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
  • Loading branch information...
avsej committed Oct 19, 2012
1 parent 2323330 commit 6d5797c9553ed354741c117a75455024ab8df8d7
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/couchbase/model.rb
View
@@ -399,7 +399,7 @@ def self.find(id)
# @example Find model using +id+
# post = Post.find_by_id('the-id')
def self.find_by_id(id)
- if id && (res = bucket.get(id, :quiet => true))
+ if id && (res = bucket.get(id, :quiet => true, :extended => true))
obj, flags, cas = res
new({:id => id, :meta => {'flags' => flags, 'cas' => cas}}.merge(obj))
end

0 comments on commit 6d5797c

Please sign in to comment.