thecore 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/ability.rb +4 -2
- data/app/models/user.rb +1 -1
- data/lib/thecore/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 759c35c8f5451f753112d873d94b2ca618ff8c541ed8348056d9a0a23659eb90
|
4
|
+
data.tar.gz: b7f593dfa2f6245fdec28030663321e997c6cd60712c179be9b33d61f1b6b46e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1f39b175d0cb2549db675183da79acc600e8f3bf6e8d34fc2df494b9772cd3f9d54f256164e6d8e16124a0035a662e4fd5a7f324448b853ecbbd07cf0d3036f
|
7
|
+
data.tar.gz: 2ccae014bf185eea279241d4a64ad9ff1fef6ed2b2a7fa243d07f501bf6f50317de78ec87e9620fb5da1c6e7d24fc257c58d1e54ddb87b32db18f39981cf8028
|
data/app/models/ability.rb
CHANGED
@@ -37,11 +37,13 @@ class Ability
|
|
37
37
|
# faccia il module_eval di TheCore::Abilities, aggiungendo un metodo
|
38
38
|
# che accetta user come parametro e con dentro la definizione delle ability
|
39
39
|
# include TheCore::Abilities
|
40
|
+
core_abilities user
|
40
41
|
TheCoreAbilities.instance_methods(false).each do |a|
|
41
42
|
# method(a).call(user)
|
42
43
|
# eval("#{a} #{user}")
|
43
|
-
|
44
|
-
|
44
|
+
|
45
|
+
# Rails.logger.debug "LOADING ABILITIES FROM: #{a}"
|
46
|
+
send(a, user) if a.to_s != "core_abilities"
|
45
47
|
end
|
46
48
|
# core_abilities user
|
47
49
|
end
|
data/app/models/user.rb
CHANGED
data/lib/thecore/version.rb
CHANGED