api-blocks 0.4.8 → 0.4.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: daf37baf7b828274546adc356dcda4781671fa6080b5013e7a059d33394a72cc
4
- data.tar.gz: 8e3bc0b298195312c3c3f963197022dc9881b21eb84264a039e3ff0ecb756df0
3
+ metadata.gz: 2dea3e596004c800c53442f9b661546e8dfb2f2af67a2cf805672f5ef9f81f43
4
+ data.tar.gz: 5c95339dd088abedb4f3672ad3c7fc1910bc26b0157c24a7fdc9861b4388877c
5
5
  SHA512:
6
- metadata.gz: 9184c7acf76747146c7de1489f7f40a7bd2dae9404c073e5fc80e03cb4cfee5b85af9d26deca916e11f354ce6d3ef75375710926125ff42615a4afc490b955cc
7
- data.tar.gz: 4746d72745a82d60e0beb243ee09cbd5dbee92f1c7155fdf1acb92080d704fb31675577efbd063c35407dbad75425f4aa6005550db6f1a8bd03ccfa873830e78
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
- self.pundit_api_scope = scope
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|
@@ -2,5 +2,5 @@
2
2
 
3
3
  module ApiBlocks
4
4
  # Current version of ApiBlocks
5
- VERSION = '0.4.8'
5
+ VERSION = '0.4.9'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api-blocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul d'Hubert