Ensuring that views with two properties will quick find

This commit is contained in:
Sam Lown 2010-06-15 01:35:14 +02:00
parent 5d7fa3c198
commit d0f8b0be68
3 changed files with 15 additions and 2 deletions

View file

@ -130,7 +130,7 @@ module CouchRest
if has_view?(m)
query = args.shift || {}
return view(m, query, *args, &block)
elsif m.to_s =~ /^find_(.+)/
elsif m.to_s =~ /^find_(by_.+)/
view_name = $1
if has_view?(view_name)
query = {:key => args.first, :limit => 1}