当我做的时候究竟发生了什么:
@patient.course_enrollments.accessible_by(current_ability)
似乎发生了什么,我得到course_enrollments where course.client_id = user.client.id,我只是不明白access_by如何工作.
# ability.rb can :manage,CourseEnrollment,:course => {:client_id => user.client.id}