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: c52636b5c1ed7d99254c4a3ffeac60a3e85edb190ca2321783f75ad6a5824298
4
- data.tar.gz: 6c7681d656c2903bb55601b0168bf9973c17dee21f0118030dcb534e83d3ade7
3
+ metadata.gz: ff2fc2d1c01b95734ac79fc727db5683a484399a5e68b370c1c80665310b2758
4
+ data.tar.gz: 4c1a8848ab3a22590c902388814ce9faec463adfa032e68d0144568282788d54
5
5
  SHA512:
6
- metadata.gz: 1e792d9737426b30211fd7e0810f8021d404149be1b47587c49799fa0090e41529a52a2736d07a7a8b593d8d325d325f00f2613372c40eb7cf08ee7759f553a7
7
- data.tar.gz: 21da5721c55fe36fe9c232cc045e8b6f1ba72a13d7f275e03ed1dc8c7eac952f4d13cbcf9b4b081ddc05b70e508cc6ecf61d35259e17f1c65089d956b9457c52
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
- return value.map { |v| view.content_tag(:div, format_column(v, column, csv: csv), class: 'col-resource_item') }.join.html_safe
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
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.10.4'.freeze
2
+ VERSION = '4.10.5'.freeze
3
3
  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.10.4
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-01-03 00:00:00.000000000 Z
11
+ date: 2022-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails