I have a User model and the user has a relationship which is has_many pets. I want to be able to write an ActiveRecord query where I can select all users with a pet that doe
In rails 4 you can make this even more clear:
User.joins(:pets).where.not(pets: { name: 'fluffy' })