effective_datatables 4.20.1 → 4.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb9f04b853ac311223db59175787b3b9671a5e5eb74c97a393f5d575ac72f714
4
- data.tar.gz: 4db05c99cee7e59f7cd4e36018246a8a37348380317511414ee07fbf4ff0d690
3
+ metadata.gz: 5bfbf37b105594f8effdd8c1ca01f55e377cb3a9b011acdb200c7feef5a7e3cf
4
+ data.tar.gz: 8a72ea83642057838ecb2161693d2ce5f82ad194b6a47e6965df5f2dda48d902
5
5
  SHA512:
6
- metadata.gz: ebe4d62789555527455fcd14bb7a90b75dc66274ee7ee76fcec1522a34e97d1db22074ceaef131b27dbac62744a678fd870c0b6d845d3eb723ef03a71f1bfebf
7
- data.tar.gz: 1f705f91ad14fe6735e60771d2ab64717622d36da4da0291ba43683612b458400f7572b474634452a33793a175ce2f3fc0d86a1b66a610c9278ce9cf0e75b600
6
+ metadata.gz: 7d494134ece7fd837e979d2d4e5206745c756e1d89a1e8a521fb33f897cd7a60ea329636ca2e2ec5287d2f70c1359ec0fee413a6ee04466c88cb2974ab6c805e
7
+ data.tar.gz: 0f55926b63825664257310ebe7de15a39b129a5a882439cf34f78fc0158b4f2bf64138f9fe3966950d9caa21e1f57a0cb3dbec8c88aa6e428d745dca167e3cfe
@@ -142,20 +142,24 @@ module Effective
142
142
  when :time
143
143
  value.respond_to?(:strftime) ? value.strftime(EffectiveDatatables.format_time) : BLANK
144
144
  when :text
145
+ value_to_s = value.to_s
146
+
145
147
  if csv
146
- value
147
- elsif value.to_s.starts_with?('<') && value.to_s.ends_with?('>')
148
- view.sanitize(value.to_s)
148
+ value_to_s
149
+ elsif value_to_s.starts_with?('<') && value_to_s.ends_with?('>')
150
+ view.sanitize(value_to_s)
149
151
  else
150
- view.simple_format(value.to_s)
152
+ view.simple_format(value_to_s)
151
153
  end
152
154
  when :string
155
+ value_to_s = value.to_s
156
+
153
157
  if csv
154
- value
155
- elsif value.to_s.starts_with?('<') && value.to_s.ends_with?('>')
156
- view.sanitize(value.to_s)
158
+ value_to_s
159
+ elsif value_to_s.starts_with?('<') && value_to_s.ends_with?('>')
160
+ view.sanitize(value_to_s)
157
161
  else
158
- view.escape_once(value.to_s)
162
+ view.escape_once(value_to_s)
159
163
  end
160
164
  else
161
165
  value.to_s
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.20.1'.freeze
2
+ VERSION = '4.20.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_datatables
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.20.1
4
+ version: 4.20.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect