My ability model contains 8 roles. I’d like to use aliases to help simplify the content. Can an alias contain more than one action, e.g.
alias_action :action1, action2, :to => :basic_access
Also, is this the correct placement of the alias?
class Ability
include CanCan::Ability
alias_action :action1, action2, :to => :basic_access
def initialize(user)
...
Thanks
From the wiki:
https://github.com/ryanb/cancan/wiki/Action-Aliases
alias_actioncan be called with more than one action.alias_actioncall intoinitialize.