Rails devs, do you have a good resource for Arel ? I'm surprised that there is zero official doc for something so dense and historical. 🤔
@remi It’s a private API of Active Record, can change at any time, is no longer published as an independent gem. That would explain the lack of official docs.
@bihi Aaaah, so using Arel to build complex queries is a choose-at-your-own-risk choice if I plan those queries to stay in my codebase?
@remi Yeah it could break with any new version. But moving to SQL strings with placeholders should not be too hard in most cases if that ever happens, so I wouldn’t rush to remove all usage if Arel in your code base.

@bihi So, how does one manage complex queries then?

Raw sql?

My use case: I need to query several string columns for any word in an array of words. I could do it with `.or` queries, but I'd need A LOT of them.

edit: remembered I had this post saved https://testdouble.com/insights/how-to-build-a-search-engine-with-ruby-on-rails

How to build a search engine with Ruby on Rails

Implementing search in your Rails app can be vexing. Here's a great pattern to use that combines the best parts of ActiveRecord and Postgres.

@remi @bihi yeah, I usually resort to raw SQL