Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Easier to define non-Model related abilities, such
as :administer_site for example, which is only based on the user object. I wanted to be able to set specific abilities that are not related to any specific model, but rather based on the user object alone. Why use cancan for that though? Cause I like having all my ability definition in one place, cause then there's just one if statement to modify instead of multiple if statements all over acting directly on the user object. It was doable with cancan, but you had to call `can?(:administer, nil)` as the second argument was not optional. So I simply removed the need for the second argument by defaulting it to nil.
- Loading branch information