CanCanCanSee 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/CanCanCanSee.rb +2 -2
- data/lib/CanCanCanSee/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d0241dc78c6342a701b7775d092b2e8d4084098
|
4
|
+
data.tar.gz: 8fe35df033c1fc83d1a3e232b4a1f7866e679571
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec0b2aeb7997658741e58b2c0cfb39123dc3518764f578ab687db2e4569408703993191af7540cbb5cca74c42aa0e4e8657992bf0d4c506f7d33d6c91a46c0c2
|
7
|
+
data.tar.gz: 3c24045eb538da355a73f6fd9ce5413debd8e0336f3568c17919184bec95cb8a203b5f6b49862262f479d1a6b3738010ee157a24c09dde316a6875549127913d
|
data/README.md
CHANGED
@@ -24,11 +24,11 @@ Your `Ability.rb` file should use a `case/when` statement for different roles an
|
|
24
24
|
|
25
25
|
Create a `config/initializers/cancancansee.rb` file, and if you have a normal Ability.rb file include:
|
26
26
|
|
27
|
-
`abilities_type = single`
|
27
|
+
`abilities_type = "single"`
|
28
28
|
|
29
29
|
And if you have a custom multiple Ability.rb setup include:
|
30
30
|
|
31
|
-
`abilities_type = multiple`
|
31
|
+
`abilities_type = "multiple"`
|
32
32
|
|
33
33
|
Then, anywhere in your code or CLI, you have access to this command:
|
34
34
|
|
data/lib/CanCanCanSee.rb
CHANGED
@@ -10,12 +10,12 @@ module CanCanCanSee
|
|
10
10
|
configuration_file = File.read('config/initializers/cancancansee.rb')
|
11
11
|
|
12
12
|
|
13
|
-
if configuration_file.include?("
|
13
|
+
if configuration_file.include?("single")
|
14
14
|
|
15
15
|
my_file = File.read('app/models/ability.rb') # for single
|
16
16
|
read_file(my_file)
|
17
17
|
|
18
|
-
elsif configuration_file.include?("
|
18
|
+
elsif configuration_file.include?("multiple")
|
19
19
|
|
20
20
|
my_arr = []
|
21
21
|
|
data/lib/CanCanCanSee/version.rb
CHANGED