effective_datatables 4.19.0 → 4.19.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f5e3d8ed9d497dea48da82cc800596e4b43500d7b85030d1fced300f846218d
|
4
|
+
data.tar.gz: c9b2b959192a337aa876830f1c4c9d7b5d6b8f58f89b1ca0812be995ab050e45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c045b22d3482ef816c21f157c7cf2fc113f6434a8f0f01a7467f3cff494b1d3dda4dbce680166dc5298c8bb5723f4b3b49ec22679a48c06db792d0752435f67
|
7
|
+
data.tar.gz: 250528bb18da5a76ba3d9c1d567d56bea5e58e8093f24bb23e55c8b6821e8f58c24c60a714e245bf5312d5de069c3aaef90d061eec161facefb72765b57c65fd
|
@@ -15,7 +15,7 @@ module Effective
|
|
15
15
|
EffectiveDatatables.authorize!(self, :index, @datatable.collection_class)
|
16
16
|
|
17
17
|
render json: @datatable.to_json
|
18
|
-
rescue => e
|
18
|
+
rescue Exception => e
|
19
19
|
EffectiveDatatables.authorized?(self, :index, @datatable.try(:collection_class))
|
20
20
|
render json: error_json(e)
|
21
21
|
|
@@ -84,7 +84,7 @@ module Effective
|
|
84
84
|
render status: :ok, body: :ok
|
85
85
|
rescue Effective::AccessDenied => e
|
86
86
|
render(status: :unauthorized, body: 'Access Denied')
|
87
|
-
rescue => e
|
87
|
+
rescue Exception => e
|
88
88
|
render(status: :error, body: 'Unexpected Error')
|
89
89
|
end
|
90
90
|
|
@@ -24,20 +24,16 @@ module Effective
|
|
24
24
|
raise "#{method} block must be declared outside the datatable do ... end block"
|
25
25
|
end
|
26
26
|
|
27
|
-
if datatable.respond_to?(method)
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
view.send(method, *args, **kwargs) { yield }
|
36
|
-
else
|
37
|
-
view.send(method, *args, **kwargs)
|
38
|
-
end
|
27
|
+
subject = datatable if datatable.respond_to?(method)
|
28
|
+
subject ||= view if view.respond_to?(method)
|
29
|
+
subject ||= Tenant.helpers if defined?(Tenant) && Tenant.helpers.respond_to?(method)
|
30
|
+
|
31
|
+
return super unless subject
|
32
|
+
|
33
|
+
if block_given?
|
34
|
+
subject.send(method, *args, **kwargs) { yield }
|
39
35
|
else
|
40
|
-
|
36
|
+
subject.send(method, *args, **kwargs)
|
41
37
|
end
|
42
38
|
end
|
43
39
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_datatables
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.19.
|
4
|
+
version: 4.19.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|