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.
{{#tags}}- {{label}}
{{/tags}}