Fix array query params collapsed by Addressable::URI#query_values#1
Merged
Conversation
e65e2c7 to
63db3ab
Compare
query_values returns a Hash which deduplicates keys, so URLs with array params like tedx_event_ted_user_ids[] lose all but the last value. Build query_params as an array of pairs using query_values(Array) so Faraday preserves all values for duplicate keys. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
63db3ab to
dd7a1e8
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addressable::URI#query_valuesreturns a Hash, which deduplicates keys with the same name — array params liketedx_event_ted_user_ids[]lose all but the last value before being passed to Faradayquery_values(Array)which returns an array of[key, value]pairs, preserving all valueshas_manyassociations resolved via link URLs with array params to silently return only one record instead of all matching recordsTest plan
has_manyassociations with array params in the link URL return all records🤖 Generated with Claude Code