Skip to content
bbenezech edited this page Feb 6, 2012 · 2 revisions

Example authorizations for cancan:

  # with
  alias_action :update, :destroy, :create, :to => :write
  
  can :manage, :all
  # includes
  can :write, :all
  # includes
  can :write, Model
  # includes
  can :destroy, Model
  # includes
  can :destroy, Model, { conditions }
  # equals
  can :delete, Model, { conditions }

More here

Clone this wiki locally