diff --git a/history.txt b/history.txt index becff4d..4f06656 100644 --- a/history.txt +++ b/history.txt @@ -8,6 +8,7 @@ * Fixing find("") issue (thanks epochwolf) * Altered protected attributes so that hash provided to #attributes= is not modified * Altering typecasting for floats to better handle commas and points + * Fixing the lame pagination bug where database url (and pass!!) were included in view requests (Thanks James Hayton) Notes: diff --git a/lib/couchrest/model/collection.rb b/lib/couchrest/model/collection.rb index 17910e7..f12c7ec 100644 --- a/lib/couchrest/model/collection.rb +++ b/lib/couchrest/model/collection.rb @@ -82,6 +82,7 @@ module CouchRest design_doc['views'][view_name.to_s] && design_doc['views'][view_name.to_s]["couchrest-defaults"]) || {} view_options = default_view_options.merge(options) + view_options.delete(:database) [design_doc, view_name, view_options] end @@ -94,6 +95,8 @@ module CouchRest raise ArgumentError, 'search_name is required' if search_name.nil? search_options = options.clone + search_options.delete(:database) + [design_doc, search_name, search_options] end