cancan
cancan copied to clipboard
Different exception messages for same pair of actions and subject
Hi. After reading the wiki, I realized that I can assign custom error messages for different pairs of actions and subject. But how can I assign different messages for same pairs, but for different conditions of access dening? Like here:
cannot :manage, [Document, Plan] unless user.have_access?
cannot :manage, [Document, Plan] unless user.ready_for_work?