activerecord 4.2.9.rc1 → 4.2.9.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of activerecord might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d9c3798eb0ff9c3bcdcb27e7ec7b036d1ade146
4
- data.tar.gz: 2e0c593c891c33e92f468d09d087343e9cd145e2
3
+ metadata.gz: cbe516e4b0d1b21032993139ea21866981baf79e
4
+ data.tar.gz: 75ccd1258da47da2c5c7b7157f65583f9f356e1b
5
5
  SHA512:
6
- metadata.gz: 97f3561dc803595713da00b6945b8a7d40e280dc82cf23a4ff1db76baccd45f62c1a16aec80401e5717ce0ce95696d1ff1d39ab279dffa7c6329963d63f81ef5
7
- data.tar.gz: 4449a60f51055fa7c52231bf06e2ad323e392433ce17ab64e8c7b827a7b3d06d8c017d9813f8a83357e2de6718176ddb3649421df920f27876521e3ddb0f2b5c
6
+ metadata.gz: 036d903ca6dfa2e0f4a69e2c2fbbcab0e272877bda9a715e3796b9ed49ae4be5240b172958fabc4881a6bea4636f58ba6c23e3fcd88264f87fee8288091c96ce
7
+ data.tar.gz: 15c2c0d0539cf327288d28dff18a5f83aebb5623faf72333ec054a9f1c49600b36cd2d674f70a3698bffb8637e63813d9a947e94ed1c8df51ed98fa0b323663f
@@ -1,3 +1,10 @@
1
+ ## Rails 4.2.9.rc2 (June 19, 2017) ##
2
+
3
+ * Fix regression caused by `collection_singular_ids=` ignoring different primary key on relationship.
4
+
5
+ *Nick Pezza*
6
+
7
+
1
8
  ## Rails 4.2.9.rc1 (June 13, 2017) ##
2
9
 
3
10
  * Fix `rake db:schema:load` with subdirectories.
@@ -67,10 +67,14 @@ module ActiveRecord
67
67
  pk_type.type_cast_from_user(i)
68
68
  end
69
69
 
70
- if (objs = klass.where(pk_column => ids)).size == ids.size
70
+ objs = klass.where(pk_column => ids).index_by do |r|
71
+ r.send(pk_column)
72
+ end.values_at(*ids).compact
73
+
74
+ if objs.size == ids.size
71
75
  replace(objs.index_by { |r| r.send(pk_column) }.values_at(*ids))
72
76
  else
73
- objs.raise_record_not_found_exception!(ids, objs.size, ids.size)
77
+ klass.all.raise_record_not_found_exception!(ids, objs.size, ids.size)
74
78
  end
75
79
  end
76
80
 
@@ -8,7 +8,7 @@ module ActiveRecord
8
8
  MAJOR = 4
9
9
  MINOR = 2
10
10
  TINY = 9
11
- PRE = "rc1"
11
+ PRE = "rc2"
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.9.rc1
4
+ version: 4.2.9.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-13 00:00:00.000000000 Z
11
+ date: 2017-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.9.rc1
19
+ version: 4.2.9.rc2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 4.2.9.rc1
26
+ version: 4.2.9.rc2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activemodel
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 4.2.9.rc1
33
+ version: 4.2.9.rc2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 4.2.9.rc1
40
+ version: 4.2.9.rc2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: arel
43
43
  requirement: !ruby/object:Gem::Requirement