Using Arel to Compose SQL Queries

Posted . Visible to the public.

Arel is a library that was introduced in Rails 3 for use in constructing SQL queries. Every time you pass a hash to where, it goes through Arel eventually. Rails exposes this with a public API that we can hook into when we need to build a more complex query.

Profile picture of Henning Koch
Henning Koch
Keywords
activerecord
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2014-02-21 07:57)