effective_datatables 4.13.1 → 4.13.3
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: 195e2fea792167d2a115b603eca328921936b989a2ee8250f927f2dc0e7c9135
|
4
|
+
data.tar.gz: 945313e0c3188ece78cd3a89ec0cad517f1e72b65424b51718887d1670d477ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a833adb0cdd8b0f98775b2245b1a6fd5d08c5237ba0f01e42e3e34fe3e170073e40c70d1d43af4670f9fbad2e838a8540be6d9d33cbbb987fb2ec97e6fbcc11
|
7
|
+
data.tar.gz: 6f3e823b061a30a69499dab532a2b385233409ef9c72b24a91aac25c7527244e88dfd304bff9ca2cf824ebc3b864b6b38e3ab503f79f361d1d89dccaca2031e2
|
@@ -22,6 +22,8 @@ module EffectiveDatatablesHelper
|
|
22
22
|
|
23
23
|
datatable.view ||= self
|
24
24
|
|
25
|
+
datatable.state[:length] = 9999999 if simple
|
26
|
+
|
25
27
|
unless EffectiveDatatables.authorized?(controller, :index, datatable.collection_class)
|
26
28
|
return content_tag(:p, "You are not authorized to view this datatable. (cannot :index, #{datatable.collection_class})")
|
27
29
|
end
|
@@ -36,20 +36,24 @@ module Effective
|
|
36
36
|
EffectiveResources.with_resource_enumerator do |lines|
|
37
37
|
lines << CSV.generate_line(csv_header)
|
38
38
|
|
39
|
-
|
40
|
-
|
39
|
+
if active_record_collection?
|
40
|
+
collection.find_in_batches do |resources|
|
41
|
+
resources = arrayize(resources, csv: true)
|
42
|
+
format(resources, csv: true)
|
43
|
+
finalize(resources)
|
44
|
+
|
45
|
+
resources.each { |resource| lines << CSV.generate_line(resource) }
|
46
|
+
end
|
47
|
+
else
|
48
|
+
resources = collection
|
49
|
+
|
41
50
|
format(resources, csv: true)
|
42
51
|
finalize(resources)
|
43
52
|
|
44
53
|
resources.each { |resource| lines << CSV.generate_line(resource) }
|
45
54
|
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
private
|
50
55
|
|
51
|
-
|
52
|
-
(active_record_collection? ? :find_in_batches : :to_a)
|
56
|
+
end
|
53
57
|
end
|
54
58
|
|
55
59
|
end
|
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.13.
|
4
|
+
version: 4.13.3
|
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: 2022-
|
11
|
+
date: 2022-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|