effective_datatables 4.25.1 → 4.25.2
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: f105e25867f12dad26ccd30fbc137277c18cab56e7bce84d99ab4904653c9166
|
4
|
+
data.tar.gz: 2c2eb1af1f4b7d883500edd937be7a85b7c4597afba2f4d8a9c269615cdcbe18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3abde79798be064fa677b294fbbd8fbe8e553c477980448ffbf165a1bc5700ca7e981bf093eeecf78615aa9ca3972a689871d875ddce49450458248942b1b69
|
7
|
+
data.tar.gz: fd979688dfd24545173dd77f16a8fdaf60d1efac6110d277e10e2821ff6962311add4ce8c2ec7bb897235f6b8a1836be8c6b33ca62eab6a3d1e97ee74aa33324
|
@@ -89,18 +89,18 @@ module Effective
|
|
89
89
|
end
|
90
90
|
|
91
91
|
# Must return a string
|
92
|
-
def format_column(value, column, csv: false)
|
92
|
+
def format_column(value, column, as: nil, csv: false)
|
93
93
|
return if value.nil? || (column[:resource] && value.blank?)
|
94
94
|
|
95
|
-
if value.kind_of?(Array) && column[:as]
|
95
|
+
if value.kind_of?(Array) && [:string, :text].include?(column[:as])
|
96
96
|
if csv
|
97
97
|
return value.map { |v| format_column(v, column, csv: csv) }.join("\n")
|
98
98
|
else
|
99
|
-
return value.map { |v| view.content_tag(:div, format_column(v, column, csv: csv).html_safe, class: 'col-resource_item') }.join.html_safe
|
99
|
+
return value.map { |v| view.content_tag(:div, format_column(v, column, as: :string, csv: csv).html_safe, class: 'col-resource_item') }.join.html_safe
|
100
100
|
end
|
101
101
|
end
|
102
102
|
|
103
|
-
case column[:as]
|
103
|
+
case (as || column[:as])
|
104
104
|
when :actions
|
105
105
|
raise("please use actions_col instead of col(#{name}, as: :actions)")
|
106
106
|
when :boolean
|
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.25.
|
4
|
+
version: 4.25.2
|
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: 2024-03-
|
11
|
+
date: 2024-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|