Fixing uniqueness proxy error + more in README

This commit is contained in:
Sam Lown 2010-06-21 22:37:13 +02:00
parent 224c96e68a
commit 8337bab714
4 changed files with 54 additions and 12 deletions

View file

@ -20,7 +20,7 @@ module CouchRest
end
# Determine the base of the search
base = options[:proxy].nil? ? @klass : document.send(options[:proxy])
base = options[:proxy].nil? ? @klass : document.instance_eval(options[:proxy])
docs = base.view("by_#{attribute}", :key => value, :limit => 2, :include_docs => false)['rows']
return if docs.empty?