api-blocks 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/api_blocks/controller.rb +2 -2
- data/lib/api_blocks/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: 350e8ea9a460e3a5d7306c60bf497aa5a03b173414c038c0595cd4ffd0bad210
|
4
|
+
data.tar.gz: 422dfc7fd2cecbf43961a501788aaa4e297a0de4929879aeb6c4ab841c4a8cc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 157d73d50b4d51ef1a6849abd390c8d102c9065c0a9824732d7dbd2c7d591f6a94419f6c7ef65d890e27d8f1544aa012eab7995ab87fa610020a192517957661
|
7
|
+
data.tar.gz: 344687ec6e19b861234215d2d911bbf8c464771d9b86dbf0b05ab73da154063bbdf6b9e666cd2a1cd22cbf56cf67e008cf1afa47bcbbb1b12e6ff2af6efbb905
|
@@ -38,7 +38,7 @@ module ApiBlocks::Controller
|
|
38
38
|
# Override policy_scope to lookup pundit policies under the `scope`
|
39
39
|
# namespace
|
40
40
|
def policy_scope(scope)
|
41
|
-
api_scope = self.class.
|
41
|
+
api_scope = self.class.inherited_pundit_api_scope || []
|
42
42
|
|
43
43
|
super(api_scope + [scope])
|
44
44
|
end
|
@@ -46,7 +46,7 @@ module ApiBlocks::Controller
|
|
46
46
|
# Override authorize to lookup pundit policies under the `scope`
|
47
47
|
# namespace
|
48
48
|
def authorize(record, query = nil)
|
49
|
-
api_scope = self.class.
|
49
|
+
api_scope = self.class.inherited_pundit_api_scope || []
|
50
50
|
|
51
51
|
super(api_scope + [record], query)
|
52
52
|
end
|
data/lib/api_blocks/version.rb
CHANGED