Casecommons / pg_search

pg_search builds ActiveRecord named scopes that take advantage of PostgreSQL’s full text search
http://www.casebook.net
MIT License
1.35k stars 371 forks source link

Fix compatibility with ActiveRecord 7.2 #535

Closed fatkodima closed 3 months ago

fatkodima commented 5 months ago

The interface for Or arel node was changed in https://github.com/rails/rails/pull/51492. This currently prevents our upgrade to rails 7.2.

Fixes #536.

nertzy commented 4 months ago

Also it looks like the undercover code coverage tool is getting triggered for the new branch not having code coverage on both sides, but that doesn't make sense in this case so I'll have to figure out a way to improve that gate or disable it here.

fatkodima commented 4 months ago

I once was convinced that code coverage tools are pretty useless, especially for caring too much about its numbers (if it becomes higher/lower or should be 99%). 🤷 Imo, only like running it locally for yourself to verify that you actually tested what you wanted is useful.

fatkodima commented 4 months ago

@nertzy Sorry for pinging, but can you reconsider this PR and release a new version with the fix?

nertzy commented 3 months ago

Thanks! I updated the implementation to do a single check at require time, and based it on a direct arity check of the constructor instead of using the version.

Looks great, thanks for this fix!

fatkodima commented 3 months ago

Thank you ❤️