3 ms·
I work with Rails almost every day and I'm still quite fuzzy on where Arel ends and ActiveRecord begins. It's an area of ambiguity that a technical post on the
by peteforde 7y ago
I work with Rails almost every day and I'm still quite fuzzy on where Arel ends and ActiveRecord begins. It's an area of ambiguity that a technical post on the history and contemporary status would be appreciated by many.
- jrochkind1 7y agoFor the most part, the stuff you do when constructing a query is Arel. Where you chain methods and such. When it was first added to Rails, improving the query building possibilities, it was a separate gem that Rails depended on. I'm not sure if it was written specifically for Rails originally just maintained in a separate gem, or intended by it's original writers to be an independent project. But it was later absorbed into the Rails repo and we were later told by Rails maintainers that it's more sophisticated manual API (look up how to make a subquery with Arel for instance) were not intended as public API and had no backwards compat commitment.