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 CHANGED
@@ -1 +1 @@
1
- 0.3.0
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
- arr = []
338
- array_of_attributes.each do |attributes|
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
- - 0
9
- version: 0.3.0
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: 1663017745777293064
129
+ hash: -4502227035676277865
130
130
  segments:
131
131
  - 0
132
132
  version: "0"