Rails where() clause on model association? April 26, 2023 by Tarik Try this: User.joins(:account).where(:accounts => { :active => true })