api-blocks 0.4.8 → 0.4.9
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/lib/api_blocks/controller.rb +6 -3
- 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: 2dea3e596004c800c53442f9b661546e8dfb2f2af67a2cf805672f5ef9f81f43
|
4
|
+
data.tar.gz: 5c95339dd088abedb4f3672ad3c7fc1910bc26b0157c24a7fdc9861b4388877c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9ce32a78de8adbc86a69b72c53798b557b212ed944aaf3e4ec317aa8dbaeca27b9eee8df496fc011590b737ef50893a934220bc81b5e917a2eb250009de94ee
|
7
|
+
data.tar.gz: 04d1a032af42148f4d11901855aef1b4931cc960c47a9e4705e8bd6cd2fb454a07e7243d940b66077450aa69a732992b52e03704cfebfaaeeab5d987e9e174ca
|
@@ -21,8 +21,6 @@ module ApiBlocks::Controller
|
|
21
21
|
extend ActiveSupport::Concern
|
22
22
|
|
23
23
|
included do
|
24
|
-
mattr_accessor :pundit_api_scope
|
25
|
-
|
26
24
|
self.responder = ApiBlocks::Responder
|
27
25
|
|
28
26
|
before_action :verify_request_format!
|
@@ -68,9 +66,14 @@ module ApiBlocks::Controller
|
|
68
66
|
|
69
67
|
# Provide a default scope to pundit's `PolicyFinder`.
|
70
68
|
def pundit_scope(*scope)
|
71
|
-
|
69
|
+
@pundit_api_scope ||= scope
|
70
|
+
end
|
71
|
+
|
72
|
+
def pundit_api_scope
|
73
|
+
@pundit_api_scope
|
72
74
|
end
|
73
75
|
|
76
|
+
|
74
77
|
# Defines a error handler that returns
|
75
78
|
def handle_api_error(error_class)
|
76
79
|
rescue_from error_class do |ex|
|
data/lib/api_blocks/version.rb
CHANGED