21 ms·
The Rails ORM (ActiveRecord) is built atop of a relational algebra gem (arel, which was eventually pulled into the AR library). I'm pretty sure the arel functio
by bdcravens 6y ago
The Rails ORM (ActiveRecord) is built atop of a relational algebra gem (arel, which was eventually pulled into the AR library). I'm pretty sure the arel functions are considered private API, so it's not necessarily best practice, but you have the option to call those functions directly when you find the ORM lacking and don't want to pass around raw SQL.
- blambeau 6y agoAFAIK Arel is not a real algreba, since it does not really allow composing relations the way we want. More info here: http://www.try-alf.org/blog/2013-10-21-relations-as-first-class-citizen http://www.try-alf.org/blog/2013-10-21-relations-as-first-cl...