From 3ee810010d77d34f80cd0c0d6b0a3a518cd56823 Mon Sep 17 00:00:00 2001 From: Daniel Kirsch Date: Tue, 21 Jul 2009 14:36:09 +0200 Subject: [PATCH] forgot to add database to count query --- lib/couchrest/mixins/class_proxy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/couchrest/mixins/class_proxy.rb b/lib/couchrest/mixins/class_proxy.rb index 2e5ffdb..ab5831c 100644 --- a/lib/couchrest/mixins/class_proxy.rb +++ b/lib/couchrest/mixins/class_proxy.rb @@ -60,7 +60,7 @@ module CouchRest end def count(opts = {}, &block) - @klass.all({:raw => true, :limit => 0}.merge(opts), &block)['total_rows'] + @klass.all({:database => @database, :raw => true, :limit => 0}.merge(opts), &block)['total_rows'] end def first(opts = {})