importance 0.2.10 → 0.2.12

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: c6df73c1224caf34550ec06412c5b3d8593e8c739fe5d230aa8b21162943a345
4
- data.tar.gz: 1fca5891610167a012e98f5657031110cc1ac0fbc9e6829919f0a40c6726404a
3
+ metadata.gz: a0805e1647daf914245f31dbbd9fba89d3233fee28cc14a263c8c2aeddf63e41
4
+ data.tar.gz: 3e565b1d0730427417f76cf9500df8400a26b745896612525a83d60c79f57e89
5
5
  SHA512:
6
- metadata.gz: 24197c88322351622f52a6dc0332364edfca5102790aa6623dbb05bced77d16738402c95e72591319d8f77a810cac58a62fd458f189b19aef20b9b97fb4d9193
7
- data.tar.gz: '018c9c0a074b89a12cf5d001dfcfff8a5edda9e2f09eb271583750fa47012b9052d86d4e459b52688df44ecdb80d22c1384419d28790ad401314d28c4cb7e81c'
6
+ metadata.gz: 1fcb3d011eb22ef5e8fbda8a3b75a5f324fcbb6b1160a4572ebe8b3ad49bf78589c02757cce0c34c23b155a2088e14268f21b72b5b9eaf5f3faef698f23743d1
7
+ data.tar.gz: 90cc32aedfc608d2d30e0e5089f69bd874473bbfe0696ac954b261f2ccdd3b747aa3a4b61eaa078376565c09c4db295298900b0e28c2b391f2144e6ae5e40dde
@@ -84,7 +84,8 @@ module Importance
84
84
  next if attribute_name == ""
85
85
  next if @mappings.values.count(attribute_name) <= 1
86
86
 
87
- flash[:alert] = t("importance.errors.duplicate_mapping", attribute: attribute.labels.first)
87
+ attribute_label = @importer.importer_attributes.find { |attr| attr.key.to_s == attribute_name }.labels.first
88
+ flash[:alert] = t("importance.errors.duplicate_mapping", attribute: attribute_label)
88
89
  render :map, status: :unprocessable_entity and return
89
90
  end
90
91
 
@@ -112,6 +113,10 @@ module Importance
112
113
  else
113
114
  redirect_to (session[:redirect_url] || main_app.root_path), notice: t("importance.success.import_completed")
114
115
  end
116
+ rescue => e
117
+ if @importer.error_callback
118
+ instance_exec(e, &@importer.error_callback)
119
+ end
115
120
  end
116
121
  end
117
122
  end
@@ -1,3 +1,3 @@
1
1
  module Importance
2
- VERSION = "0.2.10"
2
+ VERSION = "0.2.12"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: importance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas_Skywalker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-16 00:00:00.000000000 Z
11
+ date: 2025-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails