simple_can 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple_can.rb +6 -3
- 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: 1b7534d9b3542c020a5bcacbecb69e2f4489ce26
|
4
|
+
data.tar.gz: 8ef7ec73a65deb3494c2a8259dd9e50a8a52f5e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40a21c98de3e818ac5a3c9d0643229b3f29612611a025f26a05fb027b4a5d74e91d8d95192f1426bfa24d3ba1c0c1230b579f6f82a454b5989aaf08f46aee2ee
|
7
|
+
data.tar.gz: 9661d6aced1eddcbfeffc258f2ab7b47f5555cf9f3f3d8e0131c2137a128b49d5f1542ea782bf231be90121e5e0073c4029ac1851362af4e5c4a5ae44a996dd6
|
data/lib/simple_can.rb
CHANGED
@@ -8,8 +8,7 @@ module SimpleCan
|
|
8
8
|
class Unauthorized < StandardError; end
|
9
9
|
|
10
10
|
def self.included(mod)
|
11
|
-
|
12
|
-
|
11
|
+
strategy_set!
|
13
12
|
meta = class << mod; self; end
|
14
13
|
meta.send(:alias_method, :orig_method_added, :method_added)
|
15
14
|
meta.send(:alias_method, :orig_singleton_method_added,
|
@@ -31,9 +30,13 @@ module SimpleCan
|
|
31
30
|
end
|
32
31
|
end
|
33
32
|
|
33
|
+
def self.strategy_set!
|
34
|
+
raise "strategy missing" if SimpleCan.strategy.nil?
|
35
|
+
end
|
36
|
+
|
34
37
|
module ClassMethods
|
35
38
|
def strategy_set!
|
36
|
-
|
39
|
+
SimpleCan.strategy_set!
|
37
40
|
end
|
38
41
|
|
39
42
|
def method_added(method)
|