Skip to content

Instantly share code, notes, and snippets.

Avatar

Ethan Lowry EthanML

View GitHub Profile
@ProGM
ProGM / arel_cheatsheet_on_steroids.md
Last active May 5, 2021
Arel cheatsheet on Steroids
View arel_cheatsheet_on_steroids.md

Arel Cheatsheet on Steroids

A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.

Tables

posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord

Table alias