2 ms·
> arbitrary SQL cannot be combined or reused in a way which leads to compositional queries You can do this, look into arel. Here's a blog post: https://blog.c
by vinceguidry 7y ago
> arbitrary SQL cannot be combined or reused in a way which leads to compositional queries
You can do this, look into arel. Here's a blog post:
https://blog.codeship.com/creating-advanced-active-record-db-queries-arel/ https://blog.codeship.com/creating-advanced-active-record-db...
- Dangeranger 7y agoYes, I know about Arel, and I’ve used it a few times to do hairy queries, but honestly it felt like swimming against the current and I wouldn’t recommend anyone write Arel queries by hand.