rails comment utiliser les jointures

User.joins(:groups).where(groups: {id: 1})
Dizzy Dog