Fixing the database in view bug
This commit is contained in:
parent
7e8bdf2855
commit
e1d140d8ae
|
@ -8,6 +8,7 @@
|
||||||
* Fixing find("") issue (thanks epochwolf)
|
* Fixing find("") issue (thanks epochwolf)
|
||||||
* Altered protected attributes so that hash provided to #attributes= is not modified
|
* Altered protected attributes so that hash provided to #attributes= is not modified
|
||||||
* Altering typecasting for floats to better handle commas and points
|
* 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:
|
Notes:
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,7 @@ module CouchRest
|
||||||
design_doc['views'][view_name.to_s] &&
|
design_doc['views'][view_name.to_s] &&
|
||||||
design_doc['views'][view_name.to_s]["couchrest-defaults"]) || {}
|
design_doc['views'][view_name.to_s]["couchrest-defaults"]) || {}
|
||||||
view_options = default_view_options.merge(options)
|
view_options = default_view_options.merge(options)
|
||||||
|
view_options.delete(:database)
|
||||||
|
|
||||||
[design_doc, view_name, view_options]
|
[design_doc, view_name, view_options]
|
||||||
end
|
end
|
||||||
|
@ -94,6 +95,8 @@ module CouchRest
|
||||||
raise ArgumentError, 'search_name is required' if search_name.nil?
|
raise ArgumentError, 'search_name is required' if search_name.nil?
|
||||||
|
|
||||||
search_options = options.clone
|
search_options = options.clone
|
||||||
|
search_options.delete(:database)
|
||||||
|
|
||||||
[design_doc, search_name, search_options]
|
[design_doc, search_name, search_options]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue