ar-extensions 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README +5 -0
  2. data/lib/ar-extensions/import.rb +3 -1
  3. metadata +2 -17
data/README CHANGED
@@ -12,6 +12,11 @@ Email: zach.dennis@gmail.com
12
12
  - For project information and feedback please consult http://rubyforge.org/projects/arext/
13
13
  - For release information please see below
14
14
 
15
+ ActiveRecord::Extensions 0.9.5
16
+ ------------------------------
17
+ April 29th, 2011
18
+ - Removed erroneous "Can't mass assign protected attribute :id" when importing models
19
+
15
20
  ActiveRecord::Extensions 0.9.4
16
21
  ------------------------------
17
22
  April 6, 2011
@@ -241,7 +241,9 @@ class ActiveRecord::Base
241
241
  # keep track of the instance and the position it is currently at. if this fails
242
242
  # validation we'll use the index to remove it from the array_of_attributes
243
243
  arr.each_with_index do |hsh,i|
244
- instance = new( hsh )
244
+ instance = new do |model|
245
+ hsh.each_pair{ |k,v| model.send("#{k}=", v) }
246
+ end
245
247
  if not instance.valid?
246
248
  array_of_attributes[ i ] = nil
247
249
  failed_instances << instance
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ar-extensions
3
3
  version: !ruby/object:Gem::Version
4
- hash: 51
5
4
  prerelease:
6
- segments:
7
- - 0
8
- - 9
9
- - 4
10
- version: 0.9.4
5
+ version: 0.9.5
11
6
  platform: ruby
12
7
  authors:
13
8
  - Zach Dennis
@@ -28,10 +23,6 @@ dependencies:
28
23
  requirements:
29
24
  - - ~>
30
25
  - !ruby/object:Gem::Version
31
- hash: 1
32
- segments:
33
- - 2
34
- - 1
35
26
  version: "2.1"
36
27
  type: :runtime
37
28
  version_requirements: *id001
@@ -103,23 +94,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
103
94
  requirements:
104
95
  - - ">="
105
96
  - !ruby/object:Gem::Version
106
- hash: 3
107
- segments:
108
- - 0
109
97
  version: "0"
110
98
  required_rubygems_version: !ruby/object:Gem::Requirement
111
99
  none: false
112
100
  requirements:
113
101
  - - ">="
114
102
  - !ruby/object:Gem::Version
115
- hash: 3
116
- segments:
117
- - 0
118
103
  version: "0"
119
104
  requirements: []
120
105
 
121
106
  rubyforge_project: arext
122
- rubygems_version: 1.6.0
107
+ rubygems_version: 1.6.2
123
108
  signing_key:
124
109
  specification_version: 3
125
110
  summary: Extends ActiveRecord functionality.