From e922b81ccc846c83ae9287fd6b511cb522afc0d4 Mon Sep 17 00:00:00 2001 From: Sam Lown Date: Sat, 13 Mar 2010 15:03:38 +0000 Subject: [PATCH] Using database method call instead of using variable --- lib/couchrest/mixins/collection.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/couchrest/mixins/collection.rb b/lib/couchrest/mixins/collection.rb index 696dae7..e4ebc70 100644 --- a/lib/couchrest/mixins/collection.rb +++ b/lib/couchrest/mixins/collection.rb @@ -20,7 +20,7 @@ module CouchRest class_eval <<-END, __FILE__, __LINE__ + 1 def self.find_all_#{collection_name}(options = {}) view_options = #{view_options.inspect} || {} - CollectionProxy.new(@database, "#{design_doc}", "#{view_name}", view_options.merge(options), Kernel.const_get('#{self}')) + CollectionProxy.new(database, "#{design_doc}", "#{view_name}", view_options.merge(options), Kernel.const_get('#{self}')) end END end @@ -58,7 +58,7 @@ module CouchRest def create_collection_proxy(options) design_doc, view_name, view_options = parse_view_options(options) - CollectionProxy.new(@database, design_doc, view_name, view_options, self) + CollectionProxy.new(database, design_doc, view_name, view_options, self) end def parse_view_options(options)