mirror of
https://github.com/Fishwaldo/role_model.git
synced 2025-03-15 11:32:04 +00:00
Update README to reflect dynamic selectors
This commit is contained in:
parent
19c1499a05
commit
1fbeed288c
1 changed files with 4 additions and 0 deletions
|
@ -58,6 +58,10 @@ It works like this:
|
|||
# ... check for individual roles
|
||||
>> u.has_role? :author # has_role? is also aliased to is?
|
||||
=> false
|
||||
|
||||
# ... check for individual roles with dynamic methods (set dynamic: false to disable)
|
||||
>> u.is_author?
|
||||
=> false
|
||||
|
||||
# ... check for multiple roles
|
||||
>> u.has_any_role? :author, :manager # has_any_role? is also aliased to is_any_of?
|
||||
|
|
Loading…
Add table
Reference in a new issue