effective_datatables 4.35.7 → 4.35.8

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: ae823103d326ec830fd7dc31bab97a82de73857501741671af1a08802c37c444
4
- data.tar.gz: 782d83cf2df3553ce0afb8fbc1c75ae830aa969755f03b306a600cf32c96fc37
3
+ metadata.gz: 65886b54462041f8740017339f24c20cf01508ef6198f2ed40be654e300c1761
4
+ data.tar.gz: 8c100cdb08911f6abae96d8c077a404030d569408c1e60af760bd0ca0eb10e1b
5
5
  SHA512:
6
- metadata.gz: 8e756e4d82e7b6f075886ad4949ae3f237da5c3874787b71fe49f7fd4b08e6229510c992b86ef3373f3994e86a01f3b52cdd92931801b11d196ef482c2caad57
7
- data.tar.gz: 716b530ec0b35768954e6a7197caf264110bfc9b3907b89a43c3ec044088f6cc774b52c5225c242aea15f865d1e86f5cb3ab5c2a0a5d14cf5e7633940b1d0e09
6
+ metadata.gz: dd4e31f6922927fd6397a75773abf07863c51a778708d2bc3f5120822e33fa27d798405a7ada82b2a84beafa9cfc9f752a11e1e44f7cfe73359e53fb55be5110
7
+ data.tar.gz: 66c2a0d080a5024f4f33314fe6a7fd05effd832b8a41c5ee261e197ea28711a4bfc37339bc114af3302bfbedf0800e80dea144d3309f75e778372f43010adaa5
@@ -27,6 +27,7 @@ module Effective
27
27
  def download
28
28
  @datatable = EffectiveDatatables.find(params[:id], params[:attributes])
29
29
  @datatable.view = view_context
30
+ @datatable.csv = true
30
31
 
31
32
  EffectiveDatatables.authorize!(self, :index, @datatable.collection_class)
32
33
 
@@ -26,6 +26,9 @@ module Effective
26
26
  # Set by DSL so we can track where this datatable is coming from
27
27
  attr_accessor :source_location
28
28
 
29
+ # Set to true when CSV download
30
+ attr_accessor :csv
31
+
29
32
  extend Effective::EffectiveDatatable::Dsl
30
33
 
31
34
  include Effective::EffectiveDatatable::Attributes
@@ -275,6 +278,10 @@ module Effective
275
278
  DatatableFiltersForm.new(datatable: self)
276
279
  end
277
280
 
281
+ def csv?
282
+ csv == true
283
+ end
284
+
278
285
  private
279
286
 
280
287
  def column_tool
@@ -51,7 +51,7 @@ module Effective
51
51
  csv: csv,
52
52
  format: (format if block_given?),
53
53
  index: nil,
54
- label: label,
54
+ label: (label.try(:html_safe) || label),
55
55
  name: name,
56
56
  partial: partial,
57
57
  partial_as: partial_as,
@@ -80,7 +80,7 @@ module Effective
80
80
  csv: csv,
81
81
  format: nil,
82
82
  index: nil,
83
- label: label,
83
+ label: (label.try(:html_safe) || label),
84
84
  name: name,
85
85
  partial: partial,
86
86
  partial_as: partial_as,
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.35.7'.freeze
2
+ VERSION = '4.35.8'.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.35.7
4
+ version: 4.35.8
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: 2026-02-03 00:00:00.000000000 Z
11
+ date: 2026-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails