Given User has_many :articles in Ruby on Rails you can write something like: User .first .articles .where(published: true) .where(tags: ['ruby']) This is possible thanks to ActiveRecord::Relation. This use to be separate project known as Arel but since Rails 3 it was adopted by Rails core (Rails Associations). In this article we will have a look on some of my favorite tricks in Arel / ActiveRecord