users.where(users[:name].eq('amy')) # SELECT * FROM users WHERE users.name = 'amy' basic join In ActiveRecord (without Arel), if :photos is the name of the association, use joins users.joins(:photos) In Arel, if photos is defined as the Arel table, photos = Photo.arel_table users.join(photos) users.join(photos, Arel::Nodes::OuterJoin).on(users[:id].eq(photos[:user_id])) join with conditions users.
![Arel cheatsheet](https://cdn-ak-scissors.b.st-hatena.com/image/square/9f0b1ce25ee0984f83659c67d3d96235efa06bda/height=288;version=1;width=512/https%3A%2F%2Fassets.devhints.io%2Fpreviews%2Farel.jpg)