Skip to content

Release v5.0.0#1647

Draft
scarroll32 wants to merge 4 commits into
mainfrom
v5.0.0
Draft

Release v5.0.0#1647
scarroll32 wants to merge 4 commits into
mainfrom
v5.0.0

Conversation

@scarroll32

@scarroll32 scarroll32 commented Sep 29, 2025

Copy link
Copy Markdown
Member

Closes #1640

* Version 4.4.1

* Update gem release docs
@scarroll32 scarroll32 self-assigned this Sep 29, 2025
@scarroll32 scarroll32 changed the title Release 5.0.0 Release v5.0.0 Sep 29, 2025
@scarroll32 scarroll32 marked this pull request as draft September 29, 2025 11:51
scarroll32 and others added 3 commits September 29, 2025 14:00
)

* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release 5.0.0

2 participants