active_scaffold_export 3.6.1 → 3.7.0

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: 248e0924b010eb5822ad05cdb735f486bd848295091e3962d27c5d3717611f97
4
- data.tar.gz: d19079c8bb42ee90124f5b97440b0c0564fc418b28f23d4d7de8dd47d466a2c2
3
+ metadata.gz: 134b623b7c2d2a8a213e9a4d96b5a109bc2c4328f65a9a99ea8298877cbdf0b9
4
+ data.tar.gz: 339001d89e079dd644e5d400cea2ee0d0f98e2d4f31d07c6ed506c7f152058c5
5
5
  SHA512:
6
- metadata.gz: 882365bcd892ca7bdbda4a0638b30baca1a7e7c08220dbf53ab1751976d0904149dd1da50431210e09b9eaf9ad8a62999abd03f28f95660121ec6d054da66767
7
- data.tar.gz: 2aeb345b8beff579c6ca03b5b2fc1a595c17ab471ac8de73ff4c492cd97c7782f41952369795ea0406af3d217b6776a9b0e6569b4868eae04b206a9219b9786f
6
+ metadata.gz: a6f20cc0ad8963b04605ba640839bd29e3188dbbddff8a1d994a1ec0e7c8f04f7520cbade25dac488ba2de4a82d5f9a3a5b3254a42644f1ef13549a35a66406a
7
+ data.tar.gz: 10fbed3a3f6dd3686068fd8b611ebeee814b48c18e477b56c66b46c5a39e7d25f5b11aafdfa10570476ee2efa941c70665d57345ddd51d9e6507fcc6f42cfc10
@@ -12,6 +12,8 @@ module ActiveScaffold
12
12
  def get_export_column_value(record, column, format)
13
13
  if (method = export_column_override(column))
14
14
  send(method, record)
15
+ elsif column.list_ui && (method = override_export_ui(column.list_ui))
16
+ send(method, record, column, ui_options: column.list_ui_options || column.options)
15
17
  else
16
18
  raw_value = record.send(column.name)
17
19
 
@@ -31,6 +33,15 @@ module ActiveScaffold
31
33
  override_helper column, 'export_column'
32
34
  end
33
35
 
36
+ # the naming convention for overriding column types with helpers
37
+ def override_export_ui(list_ui)
38
+ ActiveScaffold::Registry.cache :export_ui_overrides, list_ui do
39
+ method = "active_scaffold_export_#{list_ui}"
40
+ method if respond_to? method
41
+ end
42
+ end
43
+ alias override_export_ui? override_export_ui
44
+
34
45
  def format_export_column(raw_value, format)
35
46
  method = "format_value_for_#{format}"
36
47
  respond_to?(method) ? send(method, raw_value) : raw_value
@@ -1,8 +1,8 @@
1
1
  module ActiveScaffoldExport
2
2
  module Version
3
3
  MAJOR = 3
4
- MINOR = 6
5
- PATCH = 1
4
+ MINOR = 7
5
+ PATCH = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_scaffold_export
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.1
4
+ version: 3.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volker Hochstein
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-06-26 00:00:00.000000000 Z
13
+ date: 2024-07-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: active_scaffold