Fixing uniqueness proxy error + more in README
This commit is contained in:
parent
224c96e68a
commit
8337bab714
4 changed files with 54 additions and 12 deletions
|
@ -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?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue