I have the following models
class Employee < ApplicationRecord
has_many :employee_skills
has_many :skills, throught: :employee_skills
end
class Skill < ApplicationRecord
has_many :employee_skills
has_many :employees, through: :employee_skills
end
class EmployeeSkill < ApplicationRecord
belongs_to :employee
belongs_to :skill
end
How can i query for employees which have skill 1 AND 2 AND 3 (or more skills). Array conditions (see Rails Guide) selects with OR not with AND.