imp_exp 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/services/imp_exp/models/base.rb +9 -6
- data/lib/imp_exp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6778be6a5af145d10c0e080a3a33085a8721d41cc3080b7e4e9ac0b49e35f8ed
|
4
|
+
data.tar.gz: d1b14539b4d4fde177d944913006b5251ac9b4f28e04d889e36b9a383bb67f39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d45e45c432147983beb0c7f5d1ed7052f3e34de499eba768feabdec55fc201db8bb68c91932b05cdd0177166cd796985c36bd234d8e6f11d274c9ec8333ead2
|
7
|
+
data.tar.gz: d540eba3c9fd5d711c3d9a036045bcea0969bd5f10f829b12f3efe9b58acd28a4435fcbe85195e1d32e3ee9a4b2804da61f36cb47e618fbdc83b71504e6b08ef
|
@@ -87,8 +87,13 @@ module ImpExp
|
|
87
87
|
def headers_translated
|
88
88
|
(attributes + relations).map do |name, opts = {}|
|
89
89
|
i18n_path = opts[:i18n_path].presence || "#{active_record_class.model_name.i18n_key}.#{name}"
|
90
|
-
|
91
|
-
|
90
|
+
begin
|
91
|
+
I18n.t("activerecord.attributes.#{i18n_path}", raise: true)
|
92
|
+
rescue I18n::MissingTranslationData
|
93
|
+
raise if opts[:i18n_path].present?
|
94
|
+
|
95
|
+
I18n.t("attributes.#{name}", raise: true)
|
96
|
+
end
|
92
97
|
end
|
93
98
|
end
|
94
99
|
|
@@ -97,11 +102,9 @@ module ImpExp
|
|
97
102
|
end
|
98
103
|
|
99
104
|
def rows(scoping_parent)
|
100
|
-
|
101
|
-
|
102
|
-
rows << row(record)
|
105
|
+
preload_associations(order(scoped(scoping_parent))).map do |record|
|
106
|
+
row(record)
|
103
107
|
end
|
104
|
-
rows
|
105
108
|
end
|
106
109
|
|
107
110
|
def row(record)
|
data/lib/imp_exp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imp_exp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dev team Nerya
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: caxlsx
|