My favourite part of Rails is clearly ActiveRecord’s scopes. Their expressiveness and their reusability is simply great. You’ll see below five tricks I usually bring during consulting missions. 1) Join query with condition on the associated tableSay you have a users table, with a profile association. If you need to query users which profile is validated you may end up doing: # User model scope :ac