I\'m trying to do something that I thought it would be simple but it seems not to be.
I have a project model that has many vacancies.
class Project &
The error is telling you that vacancies is not a column in projects, basically.
This should work
Project.joins(:vacancies).where('COUNT(vacancies.project_id) > 0')