~/talk

How to use Arel? Wrong answers only!

Talkat Helvetic Ruby 2024 · on Friday, 2024-05-17· [ruby-on-rails]
slides:none on file

Shows using ActiveRecord and Arel visitor to traverse ASTs, collect table aliases, and rewrite them so merged scopes produce a single join instead of slow subqueries. Demonstrates why naive hash conditions cause alias mismatches and SQL injection risk, then builds a custom walker that maps aliases, swaps aliases across trees, and copies nodes to avoid cached mutation. Result: a working but fragile hack that fixes one query pattern at the cost of brittle, implementation-dependent code.

AI-written summary · about

~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.