Conditions on a has_many :through and ActiveRecord 4.1 enum

Say you have a set of models (model names sanitized for generic posting) where the join table in the middle of a has_many :through has an enum that you want to add a filtered association for. class Student < ActiveRecord::Base has_many :student_grades has_many :grades, through: :student_grades end class StudentGrade < ActiveRecord::Base enum approval_status: [:not_reviewed, :rejected, […]