You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
What happens there depends on what you have in the Ability class. In a simple case, CanCan will just append a where clause to that passing in your hash conditions.
# in Ability
can :manage, CourseEnrollment, :enrolled => true
# does this
@patient.course_enrollments.where(:enrolled => true)
It does more complex things when a nested hash is provided because it needs to do a joins clause as well, but the behavior is similar.
What exactly happens in this scenario?
It seems to do exactly what I want, but it is just crazy that it works
The text was updated successfully, but these errors were encountered: