This is the code I currently have:
project_ids = ProjectEnrollment.unscoped.where(user: self).pluck(:project_id)
Project.where(id: project_ids)
I'm sure there has to be a better way. Thanks!
Edit: I'm already using the method from the has_many relationship, with scoped projects for another case.