From 159a761ad9ec61803a3f61e4b656e9dc515dcba3 Mon Sep 17 00:00:00 2001 From: Brian Candler Date: Fri, 27 Mar 2009 20:21:03 +0000 Subject: [PATCH] Tidy up initialisations of design_doc which are no longer needed --- lib/couchrest/mixins/design_doc.rb | 1 - lib/couchrest/mixins/document_queries.rb | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/couchrest/mixins/design_doc.rb b/lib/couchrest/mixins/design_doc.rb index d4f5629..e84e6b5 100644 --- a/lib/couchrest/mixins/design_doc.rb +++ b/lib/couchrest/mixins/design_doc.rb @@ -16,7 +16,6 @@ module CouchRest def design_doc_slug return design_doc_slug_cache if (design_doc_slug_cache && design_doc_fresh) funcs = [] - self.design_doc ||= Design.new(default_design_doc) design_doc['views'].each do |name, view| funcs << "#{name}/#{view['map']}#{view['reduce']}" end diff --git a/lib/couchrest/mixins/document_queries.rb b/lib/couchrest/mixins/document_queries.rb index ff05ee2..84293e2 100644 --- a/lib/couchrest/mixins/document_queries.rb +++ b/lib/couchrest/mixins/document_queries.rb @@ -12,7 +12,6 @@ module CouchRest # name of the current class. Take the standard set of # CouchRest::Database#view options. def all(opts = {}, &block) - self.design_doc ||= Design.new(default_design_doc) unless design_doc_fresh refresh_design_doc end