Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing issue with :reduce symbol in views

  • Loading branch information...
commit 02a6413cb938d83e2c8dcca6bec05adb63cfcb8b 1 parent 856fe25
Sam Lown samlown authored
1  .gitignore
View
@@ -2,4 +2,5 @@
html/*
pkg
*.swp
+*.gem
Gemfile.lock
2  history.txt
View
@@ -1,4 +1,4 @@
-== 1.1.0.rc
+== 1.1.0.pre - 2011-04-08
* Major changes
* Time#to_json monkey patch removed! Standard JSON methods now used instead.
2  lib/couchrest/design.rb
View
@@ -46,7 +46,7 @@ def view_on db, view_name, query = {}, &block
query = view_defaults(view_name).merge(query)
# Ensure reduce is set if dealing with a reduceable view
# This is a requirement of CouchDB.
- query['reduce'] ||= false if can_reduce_view?(view_name)
+ query[:reduce] ||= false if can_reduce_view?(view_name)
db.view(view_slug, query, &block)
end
1  spec/couchrest/design_spec.rb
View
@@ -189,6 +189,7 @@
@des['views']['by_code']['couchrest-defaults'].should be_nil
end
it "should include reduce parameter in query" do
+ # this would fail without it
res = @des.view :by_code
res["rows"][0]["key"].should == 'a'
end
Please sign in to comment.
Something went wrong with that request. Please try again.