activerecord 5.0.1.rc1 → 5.0.1.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: 953b40722753f09afe5e56d51a78a2aca83a26cf
4
- data.tar.gz: 8331cc743634b2444a933cb84edbdc0dff79abfd
3
+ metadata.gz: f62c383705fde778c27689d0c9920862517f005b
4
+ data.tar.gz: cfbac4b078335fd3fa7eaa433c8141341517b605
5
5
  SHA512:
6
- metadata.gz: 3836e3ac44e8afe18c3fe46e957b9c0e59da3ff22ac3f1e2f5db91da867e40785b61db201266e5e86b7f2aaf27da250d9142547c4eb0802a2b76fd786d18053d
7
- data.tar.gz: 96552fa27ac3c8516e5b88a16144730b812ea5e9948104befb4a3d4a417f73ec2e0f4690d724238a6113fa3224a47ecdcd73ffb0c699668c783fdafd95a99772
6
+ metadata.gz: 979ac90d8dd118a28850dbb9d6914a44281a73cc010d496a7448919b68df685a4a2a2790c4236586d6e56c114d59b1bf528625653214164850fcac6baeb6c825
7
+ data.tar.gz: 6ea3cc454414b11181d199611a626482f8a6a2c704e9d6d6460544af65f2cb14374e0703f4969669ff8ad2e61be1c06dbdf4a83cfefbef2fc321ca53fed4f958
@@ -1,3 +1,20 @@
1
+ ## Rails 5.0.1.rc2 (December 10, 2016) ##
2
+
3
+ * Correct resolution of associated class in `has_many :through`
4
+ associations' `*_ids` setters.
5
+
6
+ Fixes #27297.
7
+
8
+ *Matthew Draper*
9
+
10
+ * Support index length and order options using both string and symbol
11
+ column names.
12
+
13
+ Fixes #27243.
14
+
15
+ *Ryuta Kamizono*
16
+
17
+
1
18
  ## Rails 5.0.1.rc1 (December 01, 2016) ##
2
19
 
3
20
  * Fix that unsigned with zerofill is treated as signed.
@@ -23,8 +40,8 @@
23
40
  of `Article.category(true)` where `category` is a singular
24
41
  association.
25
42
 
26
- The force reloading of the association reader was deprecated in
27
- #20888. Unfortunately the suggested alternative of
43
+ The force reloading of the association reader was deprecated
44
+ in #20888. Unfortunately the suggested alternative of
28
45
  `article.reload.category` does not expose the same behavior.
29
46
 
30
47
  This patch adds a reader method with the prefix `reload_` for
@@ -76,7 +76,7 @@ module ActiveRecord
76
76
  r.send(reflection.association_primary_key)
77
77
  end.values_at(*ids).compact
78
78
  if records.size != ids.size
79
- scope.raise_record_not_found_exception!(ids, records.size, ids.size, reflection.association_primary_key)
79
+ klass.all.raise_record_not_found_exception!(ids, records.size, ids.size, reflection.association_primary_key)
80
80
  else
81
81
  replace(records)
82
82
  end
@@ -1169,6 +1169,7 @@ module ActiveRecord
1169
1169
  if order = options[:order]
1170
1170
  case order
1171
1171
  when Hash
1172
+ order = order.symbolize_keys
1172
1173
  quoted_columns.each { |name, column| column << " #{order[name].upcase}" if order[name].present? }
1173
1174
  when String
1174
1175
  quoted_columns.each { |name, column| column << " #{order.upcase}" if order.present? }
@@ -716,6 +716,7 @@ module ActiveRecord
716
716
  if length = options[:length]
717
717
  case length
718
718
  when Hash
719
+ length = length.symbolize_keys
719
720
  quoted_columns.each { |name, column| column << "(#{length[name]})" if length[name].present? }
720
721
  when Integer
721
722
  quoted_columns.each { |name, column| column << "(#{length})" }
@@ -8,7 +8,7 @@ module ActiveRecord
8
8
  MAJOR = 5
9
9
  MINOR = 0
10
10
  TINY = 1
11
- PRE = "rc1"
11
+ PRE = "rc2"
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
@@ -855,6 +855,10 @@ module ActiveRecord
855
855
  actual_source_reflection.options[:primary_key] || primary_key(klass || self.klass)
856
856
  end
857
857
 
858
+ def association_primary_key_type
859
+ klass.type_for_attribute(association_primary_key)
860
+ end
861
+
858
862
  # Gets an array of possible <tt>:through</tt> source reflection names in both singular and plural form.
859
863
  #
860
864
  # class Post < ActiveRecord::Base
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: 5.0.1.rc1
4
+ version: 5.0.1.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: 2016-11-30 00:00:00.000000000 Z
11
+ date: 2016-12-09 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: 5.0.1.rc1
19
+ version: 5.0.1.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: 5.0.1.rc1
26
+ version: 5.0.1.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: 5.0.1.rc1
33
+ version: 5.0.1.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: 5.0.1.rc1
40
+ version: 5.0.1.rc2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: arel
43
43
  requirement: !ruby/object:Gem::Requirement