effective_datatables 4.8.7 → 4.8.8
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9523ed0159096daf782db8331cd502b8b705667a9b6bce9b22e5e46a167cfed
|
4
|
+
data.tar.gz: 8e118dcc38bbfd2f2bbb47e2e24cbb76a12159e97060636c0625f714b7d8badf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75f57a4bd505a0c21f121c506dc3dad7f757af1a94e3e3677dfd5a941e6e1650411eacfd774d45ebe2e6c94e8cc67f47eabe89f4644824aa154cf05126e7621c
|
7
|
+
data.tar.gz: abdc9f48a7694c17313fc4a10f50987c8ecbd56e8796d1651c633c82b788ddcf94c06205797a7204fcbd49a00fb4f68bc99b6ed2884feb99d74b8a3a2d228e6e
|
@@ -16,7 +16,7 @@ module Effective
|
|
16
16
|
next unless state[:visible][name]
|
17
17
|
|
18
18
|
if opts[:partial]
|
19
|
-
locals = { datatable: self, column: opts }.merge(resource_col_locals(opts))
|
19
|
+
locals = { datatable: self, column: opts }.merge!(resource_col_locals(opts))
|
20
20
|
|
21
21
|
rendered[name] = (view.render(
|
22
22
|
partial: opts[:partial],
|
@@ -27,7 +27,6 @@ module Effective
|
|
27
27
|
spacer_template: SPACER_TEMPLATE
|
28
28
|
) || '').split(SPACER)
|
29
29
|
elsif opts[:as] == :actions # This is actions_col and actions_col do .. end, but not actions_col partial: 'something'
|
30
|
-
resources = collection.map { |row| row[opts[:index]] }
|
31
30
|
locals = { datatable: self, column: opts, spacer_template: SPACER_TEMPLATE }
|
32
31
|
|
33
32
|
atts = {
|
@@ -36,16 +35,17 @@ module Effective
|
|
36
35
|
effective_resource: effective_resource,
|
37
36
|
locals: locals,
|
38
37
|
partial: opts[:actions_partial],
|
39
|
-
}.
|
38
|
+
}.merge!(opts[:actions]).tap(&:compact!)
|
40
39
|
|
41
40
|
rendered[name] = if effective_resource.blank?
|
42
|
-
|
41
|
+
collection.map { |row| row[opts[:index]] }.map do |resource|
|
43
42
|
polymorphic_resource = Effective::Resource.new(resource, namespace: controller_namespace)
|
44
43
|
(view.render_resource_actions(resource, atts.merge(effective_resource: polymorphic_resource), &opts[:format]) || '')
|
45
44
|
end
|
46
45
|
else
|
47
|
-
(view.render_resource_actions(
|
46
|
+
(view.render_resource_actions(collection.map { |row| row[opts[:index]] }, atts, &opts[:format]) || '').split(SPACER)
|
48
47
|
end
|
48
|
+
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -135,7 +135,7 @@ module Effective
|
|
135
135
|
end
|
136
136
|
|
137
137
|
# Merge local options. Special behaviour for remote: false
|
138
|
-
if column[:actions].
|
138
|
+
if column[:actions].present? && column[:actions].kind_of?(Hash)
|
139
139
|
column[:actions].each do |action, opts|
|
140
140
|
next unless opts.kind_of?(Hash)
|
141
141
|
|
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.8.
|
4
|
+
version: 4.8.8
|
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: 2020-09-
|
11
|
+
date: 2020-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
195
|
requirements: []
|
196
|
-
rubygems_version: 3.1.
|
196
|
+
rubygems_version: 3.1.4
|
197
197
|
signing_key:
|
198
198
|
specification_version: 4
|
199
199
|
summary: Uniquely powerful server-side searching, sorting and filtering of any ActiveRecord
|