activerecord 4.1.2.rc2 → 4.1.2.rc3

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: bc2e7dd1ec009c695170d04fca72e1b73f2cecf5
4
- data.tar.gz: d794b80eaf2e1a025ae146107a2119c8b452006f
3
+ metadata.gz: 3688b8be6d02e8ce19881d8188f0f862b846ac06
4
+ data.tar.gz: 9188205a0c31bb3c73a03cedaa5191c03adad39b
5
5
  SHA512:
6
- metadata.gz: 7839508ecbc9316c73e26957103f7f8ab36db341c186f4307954ffdccbffd62cb743711af57f053bf121c53fb43ada493d31168bee3a36d1913e9ee8d3e1d8f1
7
- data.tar.gz: 8ea047f850004ebfe879797124eff1eec2c552ced7cf537b61bcbf0078d98641a219839c522ba1f41fc7d6b35c6a8ee5477f8ce6d867cc7b7fcc350c3f4854f1
6
+ metadata.gz: 93789a7e5b4235e2aafd305e3278978fcce9f09d0a6f5092b8546adb24d04c15cdd417b4f4a41f90803e3d36f02f658f7f2382f0af4ee7b6ea58076d5ff10b8a
7
+ data.tar.gz: 81003ea2c57543f23e330b0b0454f9309a7d6f598e2bc8d63ccb344138be9ffc5d81d77efdd000f6f5c89ab0e46596ad96d46d9c9d26236f38a07dccf4d8c682
@@ -1,4 +1,4 @@
1
- ## Rails 4.1.2 (June 16, 2014) ##
1
+ ## Rails 4.1.2 (June 23, 2014) ##
2
2
 
3
3
  * Fix regression on eager loading association based on SQL query rather than
4
4
  existing column.
@@ -15,7 +15,10 @@ module ActiveRecord::Associations::Builder
15
15
  end
16
16
 
17
17
  private
18
- def klass; @rhs_class_name.constantize; end
18
+
19
+ def klass
20
+ @lhs_class.send(:compute_type, @rhs_class_name)
21
+ end
19
22
  end
20
23
 
21
24
  def self.build(lhs_class, name, options)
@@ -23,13 +26,7 @@ module ActiveRecord::Associations::Builder
23
26
  KnownTable.new options[:join_table].to_s
24
27
  else
25
28
  class_name = options.fetch(:class_name) {
26
- model_name = name.to_s.camelize.singularize
27
-
28
- if lhs_class.parent_name
29
- model_name.prepend("#{lhs_class.parent_name}::")
30
- end
31
-
32
- model_name
29
+ name.to_s.camelize.singularize
33
30
  }
34
31
  KnownClass.new lhs_class, class_name
35
32
  end
@@ -94,7 +94,9 @@ module ActiveRecord
94
94
  end
95
95
 
96
96
  def through_scope_attributes
97
- scope.where_values_hash(through_association.reflection.name.to_s).except!(through_association.reflection.foreign_key)
97
+ scope.where_values_hash(through_association.reflection.name.to_s).
98
+ except!(through_association.reflection.foreign_key,
99
+ through_association.reflection.klass.inheritance_column)
98
100
  end
99
101
 
100
102
  def save_through_record(record)
@@ -8,7 +8,7 @@ module ActiveRecord
8
8
  MAJOR = 4
9
9
  MINOR = 1
10
10
  TINY = 2
11
- PRE = "rc2"
11
+ PRE = "rc3"
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.1.2.rc2
4
+ version: 4.1.2.rc3
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: 2014-06-16 00:00:00.000000000 Z
11
+ date: 2014-06-23 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.1.2.rc2
19
+ version: 4.1.2.rc3
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.1.2.rc2
26
+ version: 4.1.2.rc3
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.1.2.rc2
33
+ version: 4.1.2.rc3
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.1.2.rc2
40
+ version: 4.1.2.rc3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: arel
43
43
  requirement: !ruby/object:Gem::Requirement