Skip to content

Commit

Permalink
Adds comment to explain why filter was added
Browse files Browse the repository at this point in the history
  • Loading branch information
alxberardi committed Aug 29, 2016
1 parent 730d355 commit 8966d07
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/quick_travel/adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,16 @@ def self.response_contains_error?(response)
parsed_response.is_a?(Hash) && parsed_response.key?('error')
end

# HTTParty v0.14.0 addressed introduced this change:
#
# * [allow empty array to be used as param](https://github.com/jnunemaker/httparty/pull/477)
#
# Unfortunately, when submitting an empty array as a parameter,
# Rack interprets it as an array containing an empty string:
#
# Rack::Utils.parse_nested_query('array[]=') #=> {"array"=>[""]}
#
# The workaround is to avoid sending empty arrays to Rack based web applications
class FilterQuery
def initialize(query)
@query = query
Expand Down

0 comments on commit 8966d07

Please sign in to comment.