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: ee2ffed192a97207be7e49f3dc13ea49695e6efa6a9f302b28cc6871fb501533
4
- data.tar.gz: 747968e4eacfe8cbac5888a8535525c546465d70395b8fbad8880cd6d7f7b6cf
3
+ metadata.gz: f105e25867f12dad26ccd30fbc137277c18cab56e7bce84d99ab4904653c9166
4
+ data.tar.gz: 2c2eb1af1f4b7d883500edd937be7a85b7c4597afba2f4d8a9c269615cdcbe18
5
5
  SHA512:
6
- metadata.gz: 0d37a268fd08e0590a44dc8adf2fd041afe72ad3a49965ccfa4aac8237906d7ca4e1886a924254d2d3429e320b5c4a1f91ba9fa95aa3709b0e3bc0584796a5d1
7
- data.tar.gz: 943b66cd71ec58c8bc4db1c3257d56d882e0abb047674b8303c301e1783614a8ec0cebc2fb48fd046bf060fbe7299b4c9c8a831fe78db2a7f5380fb2ac785fd9
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] == :string
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
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.25.1'.freeze
2
+ VERSION = '4.25.2'.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.25.1
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-06 00:00:00.000000000 Z
11
+ date: 2024-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails