Empact-activerecord-import 0.3.0 → 0.3.1
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.
- data/VERSION +1 -1
- data/lib/activerecord-import/import.rb +2 -6
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
@@ -334,13 +334,9 @@ class ActiveRecord::Base
|
|
334
334
|
|
335
335
|
# Returns an Array of Hashes for the passed in +column_names+ and +array_of_attributes+.
|
336
336
|
def validations_array_for_column_names_and_attributes( column_names, array_of_attributes ) # :nodoc:
|
337
|
-
|
338
|
-
|
339
|
-
c = 0
|
340
|
-
hsh = attributes.inject( {} ){|hsh,attr| hsh[ column_names[c] ] = attr ; c+=1 ; hsh }
|
341
|
-
arr << hsh
|
337
|
+
array_of_attributes.map do |attributes|
|
338
|
+
Hash[attributes.each_with_index.map {|attr, c| [column_names[c], attr] }]
|
342
339
|
end
|
343
|
-
arr
|
344
340
|
end
|
345
341
|
|
346
342
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 1
|
9
|
+
version: 0.3.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Zach Dennis
|
@@ -126,7 +126,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
126
126
|
requirements:
|
127
127
|
- - ">="
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
hash:
|
129
|
+
hash: -4502227035676277865
|
130
130
|
segments:
|
131
131
|
- 0
|
132
132
|
version: "0"
|