csv_importable 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/csv_importable/csv_importer.rb +3 -1
- data/lib/csv_importable/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a25825a77d48f8d2d0b51327cea6383ce035247
|
4
|
+
data.tar.gz: 058e4274c4f5fb2d170ffe2ca0e502e8fd67ad0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0541676bf4b1a8d749bd229edad13c27c13d2b4ebb5bd47167502a549b7e2bc2ca33c9cdd3aa5558c6036de625930850849b8b24fc16c689aed3014380a3f7d
|
7
|
+
data.tar.gz: 681274ff454dcdbee4bc5e02808fa129aef23a0d69503ad64ba83e81a54e91e183163d476a48b568fb3111bbd62f175dadbf38c4aafd2e3c3d627441fcaa2871
|
@@ -166,6 +166,8 @@ module CSVImportable
|
|
166
166
|
|
167
167
|
idx = 1
|
168
168
|
csv.each.map do |row|
|
169
|
+
next if row.to_hash.values.all?(&:nil?) # ignore blank rows
|
170
|
+
|
169
171
|
errors = []
|
170
172
|
return_value = nil
|
171
173
|
begin
|
@@ -182,7 +184,7 @@ module CSVImportable
|
|
182
184
|
errors: result.fetch(:errors, []) + errors,
|
183
185
|
value: return_value
|
184
186
|
}
|
185
|
-
end
|
187
|
+
end.compact
|
186
188
|
end
|
187
189
|
|
188
190
|
def has_errors?
|