Skip to content

Build where_ scopes with Arel instead of ActiveRecord::Base.connection - #43

Merged
kenn merged 1 commit into
kenn:masterfrom
Teamtailor:avoid-permanent-connection-checkout
Oct 5, 2026
Merged

kenn merged 1 commit into
kenn:masterfrom
Teamtailor:avoid-permanent-connection-checkout

Conversation

@joeljunstrom

Copy link
Copy Markdown
Contributor

Quoting the column through connection permanently checks out a connection, which Rails 7.2 soft-deprecates and raises on under permanent_connection_checkout = :disallowed. Using arel_table and Arel's bitwise operators lets Active Record quote when the query runs.

Quoting the column through `connection` permanently checks out a
connection, which Rails 7.2 soft-deprecates and raises on under
`permanent_connection_checkout = :disallowed`. Using arel_table and
Arel's bitwise operators lets Active Record quote when the query runs.
@kenn
kenn merged commit 8a17980 into kenn:master Oct 5, 2026
3 checks passed
@kenn

kenn commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Released as 2.2.0 — thanks! 🙏

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.

2 participants