Skip to content

Commit

Permalink
Merge pull request RolifyCommunity#157 from glaucocustodio/master
Browse files Browse the repository at this point in the history
Example of "with_any_role" method in README.md
  • Loading branch information
EppO committed Jun 7, 2013
2 parents c8218ad + 72c522d commit fa69b33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ Starting from rolify 3.0, you can search roles on instance level or class level
# => [ list of Forum instances that has role "admin" binded to it ]
Forum.with_role(:admin, current_user)
# => [ list of Forum instances that has role "admin" binded to it and belongs to current_user roles ]

Forum.with_any_role(:user, :admin)
# => [ list of Forum instances that has role "admin" or "user" binded to it ]

Forum.find_roles
# => [ list of roles that binded to any Forum instance or to the Forum class ]
Forum.find_roles(:admin)
Expand Down

0 comments on commit fa69b33

Please sign in to comment.