Release v5.0.0#1647
Draft
scarroll32 wants to merge 4 commits into
Draft
Conversation
* Version 4.4.1 * Update gem release docs
) * Fix scopes inside groupings being silently dropped (#1339) When a ransackable scope was nested inside a grouping (e.g. `g: [{scope_name: value}]`), it was silently ignored because `Grouping#build` only routed unknown keys through `Condition.extract`, which has no awareness of scopes. This change makes `Grouping#build` recognise scope keys and apply them via `Context#chain_scope`, matching the top-level scope behaviour in `Search#add_scope`. To keep sanitisation in one place, the `sanitize_scope_args` logic is moved from `Search` to `Context` and both call sites use it. Note: as with top-level scopes, the scope is applied to the underlying relation rather than composed into the grouping's AND/OR tree. This preserves the existing 'bolt-on' semantics; full composition is left for a follow-up. * Make scope-in-grouping spec regex adapter-neutral MySQL renders the integer argument quoted (`age > '18'`) while SQLite and PostgreSQL keep it unquoted (`age > 18`).
When a custom predicate is defined with arel_predicate: 'in' and a
formatter that builds the inner SQL fragment manually (e.g. joining
with "','"), ActiveRecord double-escapes the single quotes, producing
IN ('a'',''b') instead of IN ('a', 'b').
The spec is marked pending until the fix direction is decided.
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.
Closes #1640