effective_datatables 4.20.2 → 4.20.3

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: 5bfbf37b105594f8effdd8c1ca01f55e377cb3a9b011acdb200c7feef5a7e3cf
4
- data.tar.gz: 8a72ea83642057838ecb2161693d2ce5f82ad194b6a47e6965df5f2dda48d902
3
+ metadata.gz: b290520f84f92726953ea0aef6cfa1e5c8d6acdafbc1701f6fb542357d077010
4
+ data.tar.gz: 9f7a715b57a9edf9dc31b806bdc85287e505a3e7766957599f555073ea43e71e
5
5
  SHA512:
6
- metadata.gz: 7d494134ece7fd837e979d2d4e5206745c756e1d89a1e8a521fb33f897cd7a60ea329636ca2e2ec5287d2f70c1359ec0fee413a6ee04466c88cb2974ab6c805e
7
- data.tar.gz: 0f55926b63825664257310ebe7de15a39b129a5a882439cf34f78fc0158b4f2bf64138f9fe3966950d9caa21e1f57a0cb3dbec8c88aa6e428d745dca167e3cfe
6
+ metadata.gz: d8a92d42e7b7f79761f5ad4efec357071bf5f844797883139e248177a059f9b108d62080f7d45db5e3ffbbcbf7aee4383621462bcd6e14f75ffffcffcf0ff145
7
+ data.tar.gz: e2315412cb5e63b24d5d554dfddfa69e99895ba7c30ee015d829eadfd6908e36d976cb6cb5e4151afbc7adf75ce7b54653e43e8d5c7a109796cf51364912ae87
@@ -127,9 +127,12 @@ module Effective
127
127
  else
128
128
  if values.all? { |v| v.kind_of?(ActiveRecord::Base) && v.respond_to?(name) }
129
129
  values = values.map { |v| (v[name] if opts[:sql_as_column]) || v.public_send(name) }
130
+ format_column(aggregate_column(values, opts, aggregate), opts)
131
+ elsif values.all? { |v| (v == true || v == false) }
132
+ aggregate_column(values, opts, aggregate)
133
+ else
134
+ format_column(aggregate_column(values, opts, aggregate), opts)
130
135
  end
131
-
132
- format_column(aggregate_column(values, opts, aggregate), opts)
133
136
  end || BLANK
134
137
  end.compact
135
138
  end
@@ -146,7 +146,7 @@ module Effective
146
146
 
147
147
  if csv
148
148
  value_to_s
149
- elsif value_to_s.starts_with?('<') && value_to_s.ends_with?('>')
149
+ elsif value_to_s.include?('<') && value_to_s.include?('>')
150
150
  view.sanitize(value_to_s)
151
151
  else
152
152
  view.simple_format(value_to_s)
@@ -156,7 +156,7 @@ module Effective
156
156
 
157
157
  if csv
158
158
  value_to_s
159
- elsif value_to_s.starts_with?('<') && value_to_s.ends_with?('>')
159
+ elsif value_to_s.include?('<') && value_to_s.include?('>')
160
160
  view.sanitize(value_to_s)
161
161
  else
162
162
  view.escape_once(value_to_s)
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.20.2'.freeze
2
+ VERSION = '4.20.3'.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.20.2
4
+ version: 4.20.3
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-10-25 00:00:00.000000000 Z
11
+ date: 2023-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails