Skip to content

Conversation

bensheldon
Copy link
Contributor

This seems a little trivial to suggest (sorry!) but using a range in Rails 7.1 turns the query value into a proper bind parameter and preparable statement. This will become unnecessary in the next release of Rails. And I like the beginless/endless queries and all the other queries in SolidQueue that I could find use this style too 👍🏻

Here's a writeup with a little more info: https://island94.org/2024/03/rails-active-record-will-it-bind

@rosa
Copy link
Member

rosa commented Apr 1, 2024

Ooh, great catch! Thank you so much 🙏 And great article too 💯

@rosa rosa merged commit 511f1ff into rails:main Apr 1, 2024
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