effective_datatables 4.10.4 → 4.10.5
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: ff2fc2d1c01b95734ac79fc727db5683a484399a5e68b370c1c80665310b2758
|
4
|
+
data.tar.gz: 4c1a8848ab3a22590c902388814ce9faec463adfa032e68d0144568282788d54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9001e7fe0a63a75445f35a9a36046a40a067f31c57e424ac0ac5c76a83662b762238e9a3e15b45b6ac893af369a97d2f3b3becaac01ff8b93fb3ccdeff94c29c
|
7
|
+
data.tar.gz: 8a4be22def5f90615598d06a0a89b578bb088be5b61beb2b65267466070b80fe3490e40821755158857357abf4faff15a45ea4957bda17ba5316489b10397eb1
|
@@ -176,6 +176,8 @@ module Effective
|
|
176
176
|
|
177
177
|
if column[:format]
|
178
178
|
datatable.dsl_tool.instance_exec(obj, row, &column[:format])
|
179
|
+
elsif column[:as] == :belongs_to_polymorphic
|
180
|
+
obj.send(column[:name]).to_s
|
179
181
|
elsif column[:partial]
|
180
182
|
obj.to_s
|
181
183
|
elsif obj.respond_to?(column[:name])
|
@@ -96,7 +96,11 @@ module Effective
|
|
96
96
|
end
|
97
97
|
|
98
98
|
if value.kind_of?(Array) && column[:as] == :string
|
99
|
-
|
99
|
+
if csv
|
100
|
+
return value.map { |v| format_column(v, column, csv: csv) }.join("\n")
|
101
|
+
else
|
102
|
+
return value.map { |v| view.content_tag(:div, format_column(v, column, csv: csv), class: 'col-resource_item') }.join.html_safe
|
103
|
+
end
|
100
104
|
end
|
101
105
|
|
102
106
|
case column[:as]
|
@@ -119,7 +123,7 @@ module Effective
|
|
119
123
|
when :duration
|
120
124
|
view.number_to_duration(value)
|
121
125
|
when :effective_addresses
|
122
|
-
value.to_html
|
126
|
+
csv ? value.to_html.gsub('<br>', "\n") : value.to_html
|
123
127
|
when :effective_obfuscation
|
124
128
|
value
|
125
129
|
when :effective_roles
|
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.10.
|
4
|
+
version: 4.10.5
|
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-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|