What exactly is happening when I do:
@patient.course_enrollments.accessible_by(current_ability)
What seems to happen is I get course_enrollments where course.client_id = user.client.id
, I just don't understand how accessible_by
works.
# ability.rb
can :manage, CourseEnrollment, :course => {:client_id => user.client.id}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…