rolify 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.rdoc +7 -4
  2. data/lib/rolify/version.rb +1 -1
  3. metadata +1 -1
data/README.rdoc CHANGED
@@ -4,7 +4,7 @@ Very simple Roles library without any authorization enforcement supporting scope
4
4
 
5
5
  Let's see an example:
6
6
 
7
- user.is_moderator?(Forum.first)
7
+ user.has_role?("moderator", Forum.first)
8
8
  => false # if user is moderator of another Forum
9
9
 
10
10
  This library was intended to be used with CanCan[https://github.com/ryanb/cancan] and devise[https://github.com/plataformatec/devise/] but should be generic enough to be used by any other authentication/authorization solutions.
@@ -66,9 +66,9 @@ To check if a user has a global role
66
66
  To check if a user has a role scoped to a resource
67
67
 
68
68
  user = User.find(2)
69
- user.has_role "moderator", Forum.first
69
+ user.has_role? "moderator", Forum.first
70
70
  => true
71
- user.has_role "moderator", Forum.last
71
+ user.has_role? "moderator", Forum.last
72
72
  => false
73
73
 
74
74
  == Questions or Problems?
@@ -77,4 +77,7 @@ If you have any issues with rolify which you cannot find the solution to in the
77
77
 
78
78
  == TODO
79
79
 
80
- * put syntactic sugar
80
+ * put syntactic sugar:
81
+ * +is_admin?+ like shortcuts
82
+ * multiple role names query at the same time
83
+ * write a tutorial showing how to use rolify with CanCan and devise
@@ -1,3 +1,3 @@
1
1
  module Rolify
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rolify
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Florent Monbillard