effective_datatables 4.19.1 → 4.20.0
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: c5bf5141b655e975b0e158b2f33572d8b8acc1f13ffa50d25f761795c6cdeb25
|
4
|
+
data.tar.gz: 67c30d8895b19d093e43e6ae1b521a528a18ea8ca156ca90209e8c1c922248c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d08c8f32b066240576a4e4ee4cdea3916999d6c26f44e9c4533b125625de29922ae49ceebfdbd9ce68ba6be5d7da81255f9b60e54af5a250b380ae9bab94952
|
7
|
+
data.tar.gz: e20da9812bae53fbcaf98fc18022d624c41fe918f544607ea6a7ad0c8d8d062b9f4c8dc89fe5ca067e3b9daf2e47e2537404ce40a50d0c514b475a06b9aa05b7
|
@@ -92,10 +92,6 @@ module Effective
|
|
92
92
|
def format_column(value, column, csv: false)
|
93
93
|
return if value.nil? || (column[:resource] && value.blank?)
|
94
94
|
|
95
|
-
unless column[:as] == :email
|
96
|
-
return value if value.kind_of?(String)
|
97
|
-
end
|
98
|
-
|
99
95
|
if value.kind_of?(Array) && column[:as] == :string
|
100
96
|
if csv
|
101
97
|
return value.map { |v| format_column(v, column, csv: csv) }.join("\n")
|
@@ -145,6 +141,16 @@ module Effective
|
|
145
141
|
end
|
146
142
|
when :time
|
147
143
|
value.respond_to?(:strftime) ? value.strftime(EffectiveDatatables.format_time) : BLANK
|
144
|
+
when :text
|
145
|
+
if csv
|
146
|
+
value
|
147
|
+
elsif value.to_s.starts_with?('<') && value.ends_with?('>')
|
148
|
+
view.sanitize(value.to_s)
|
149
|
+
else
|
150
|
+
view.simple_format(value.to_s)
|
151
|
+
end
|
152
|
+
when :string
|
153
|
+
csv ? value : view.escape_once(value.to_s)
|
148
154
|
else
|
149
155
|
value.to_s
|
150
156
|
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.
|
4
|
+
version: 4.20.0
|
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-
|
11
|
+
date: 2023-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|