activerecord-import 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/activerecord-import/import.rb +3 -1
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.7
|
@@ -245,7 +245,9 @@ class ActiveRecord::Base
|
|
245
245
|
# keep track of the instance and the position it is currently at. if this fails
|
246
246
|
# validation we'll use the index to remove it from the array_of_attributes
|
247
247
|
arr.each_with_index do |hsh,i|
|
248
|
-
instance = new
|
248
|
+
instance = new do |model|
|
249
|
+
hsh.each_pair{ |k,v| model.send("#{k}=", v) }
|
250
|
+
end
|
249
251
|
if not instance.valid?
|
250
252
|
array_of_attributes[ i ] = nil
|
251
253
|
failed_instances << instance
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-import
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 7
|
10
|
+
version: 0.2.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Zach Dennis
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-04-
|
18
|
+
date: 2011-04-29 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|