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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 134b623b7c2d2a8a213e9a4d96b5a109bc2c4328f65a9a99ea8298877cbdf0b9
|
4
|
+
data.tar.gz: 339001d89e079dd644e5d400cea2ee0d0f98e2d4f31d07c6ed506c7f152058c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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-
|
13
|
+
date: 2024-07-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: active_scaffold
|