I have three tables: `users`, `cars`, and `mechanics`. 

associations:

* user has\_many cars, car belongs to user
* car belongs\_to mechanic, machanic has\_many cars

I want to find users with cars repaired by a specific mechanic, so I'm doing something like this:

`User.joins(:cars).where('cars.color = ? AND cars.type = ? AND cars.mechanic.name = ?', 'green', 'estate', 'paul')`

The trick is that I don't know how to write this `cars.mechanic.name` part.