Fixing issues with Ruby 1.8.7

This commit is contained in:
Sam Lown 2011-04-08 22:34:25 +02:00
parent 33b844b596
commit a6becd7305
8 changed files with 118 additions and 41 deletions

View file

@ -29,7 +29,8 @@ module CouchRest
if base.respond_to?(:has_view?) && !base.has_view?(view_name)
raise "View #{document.class.name}.#{options[:view]} does not exist!" unless options[:view].nil?
model.view_by *keys, :allow_nil => true
keys << {:allow_nil => true}
model.view_by(*keys)
end
rows = base.view(view_name, :key => values, :limit => 2, :include_docs => false)['rows']