Tidy up initialisations of design_doc which are no longer needed

This commit is contained in:
Brian Candler 2009-03-27 20:21:03 +00:00 committed by Matt Aimonetti
parent 266583805c
commit 159a761ad9
2 changed files with 0 additions and 2 deletions

View file

@ -16,7 +16,6 @@ module CouchRest
def design_doc_slug def design_doc_slug
return design_doc_slug_cache if (design_doc_slug_cache && design_doc_fresh) return design_doc_slug_cache if (design_doc_slug_cache && design_doc_fresh)
funcs = [] funcs = []
self.design_doc ||= Design.new(default_design_doc)
design_doc['views'].each do |name, view| design_doc['views'].each do |name, view|
funcs << "#{name}/#{view['map']}#{view['reduce']}" funcs << "#{name}/#{view['map']}#{view['reduce']}"
end end

View file

@ -12,7 +12,6 @@ module CouchRest
# name of the current class. Take the standard set of # name of the current class. Take the standard set of
# CouchRest::Database#view options. # CouchRest::Database#view options.
def all(opts = {}, &block) def all(opts = {}, &block)
self.design_doc ||= Design.new(default_design_doc)
unless design_doc_fresh unless design_doc_fresh
refresh_design_doc refresh_design_doc
end end