importance 0.2.8 → 0.2.9
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 +4 -4
- data/app/controllers/importance/imports_controller.rb +4 -4
- data/lib/importance/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 42055589da3354a8681a72e9073892f1e60e2b457ed65499c611734f3929a095
|
|
4
|
+
data.tar.gz: a840d6cdad3a5450ca65631ed3b751063d93ae2722111602719a0d5dd0103311
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d3cfc2dfbfa0022f74360ba3e642a399166fd8d2b617c8d4629187f8bd6ea0d3019f6087c87308a1a3fedbd40b1b587aeb4f9afb237377cd1279b6284094da22
|
|
7
|
+
data.tar.gz: a0f7a9a475fd151c07446e875161885e89b258534067fefccbb6782b85454916062d6eead60c39309eb47d42b9dafaccfd7b3c69d8240b6f03764a743a917012
|
|
@@ -62,12 +62,12 @@ module Importance
|
|
|
62
62
|
|
|
63
63
|
if @importer.nil?
|
|
64
64
|
flash[:alert] = t("importance.errors.no_importer")
|
|
65
|
-
render :map and return
|
|
65
|
+
render :map, status: :unprocessable_entity and return
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
if params[:mappings].nil?
|
|
69
69
|
flash[:alert] = t("importance.errors.no_mappings")
|
|
70
|
-
render :map and return
|
|
70
|
+
render :map, status: :unprocessable_entity and return
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
@mappings = params[:mappings].permit!.to_h.map { |k, v| [ k.to_i, v ] }.to_h
|
|
@@ -77,7 +77,7 @@ module Importance
|
|
|
77
77
|
next if @mappings.values.include?(attribute.key.to_s)
|
|
78
78
|
|
|
79
79
|
flash[:alert] = t("importance.errors.missing_mapping", attribute: attribute.labels.first)
|
|
80
|
-
render :map and return
|
|
80
|
+
render :map, status: :unprocessable_entity and return
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
@mappings.each do |column_index, attribute_name|
|
|
@@ -85,7 +85,7 @@ module Importance
|
|
|
85
85
|
next if @mappings.values.count(attribute_name) <= 1
|
|
86
86
|
|
|
87
87
|
flash[:alert] = t("importance.errors.duplicate_mapping", attribute: attribute_name)
|
|
88
|
-
render :map and return
|
|
88
|
+
render :map, status: :unprocessable_entity and return
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
if @importer.setup_callback
|
data/lib/importance/version.rb
CHANGED