-
-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add 2014_1 wsdl, make search results work when there is only a single result on a page #82
base: master
Are you sure you want to change the base?
Changes from all commits
559b2c3
30eedc7
d2843ee
63565ea
db66c86
90f9701
b48a41f
6f01428
1da9059
cddb3a0
de6b09b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,15 +23,15 @@ def initialize(response, result_class) | |
if response.body.has_key?(:record_list) | ||
# basic search results | ||
record_list = response.body[:record_list][:record] | ||
record_list = [record_list] if @total_records == 1 | ||
record_list = [record_list] unless record_list.is_a?(Array) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm curious... why was this needed? What situation broke the existing implementation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When you have more than one page of items and the last page has only a single item. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh, got it. Nice catch! Merged this into master. |
||
|
||
record_list.each do |record| | ||
results << result_class.new(record) | ||
end | ||
elsif response.body.has_key? :search_row_list | ||
elsif response.body.has_key?(:search_row_list) | ||
# advanced search results | ||
record_list = response.body[:search_row_list][:search_row] | ||
record_list = [record_list] if @total_records == 1 | ||
record_list = response.body[:search_row_list].try(:[], :search_row) || [] | ||
record_list = [record_list] unless record_list.is_a?(Array) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In what case this did this occur? |
||
record_list.each do |record| | ||
# TODO because of customFieldList we need to either make this recursive | ||
|
@@ -90,4 +90,4 @@ def results_in_batches | |
|
||
end | ||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why were these additional SSL configuration options needed? I'm hesitant to merge them in unless there is a strong general use case.