activerecord 4.1.2.rc1 → 4.1.2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc2e7dd1ec009c695170d04fca72e1b73f2cecf5
|
4
|
+
data.tar.gz: d794b80eaf2e1a025ae146107a2119c8b452006f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7839508ecbc9316c73e26957103f7f8ab36db341c186f4307954ffdccbffd62cb743711af57f053bf121c53fb43ada493d31168bee3a36d1913e9ee8d3e1d8f1
|
7
|
+
data.tar.gz: 8ea047f850004ebfe879797124eff1eec2c552ced7cf537b61bcbf0078d98641a219839c522ba1f41fc7d6b35c6a8ee5477f8ce6d867cc7b7fcc350c3f4854f1
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,11 @@
|
|
1
|
-
## Rails 4.1.2 (
|
1
|
+
## Rails 4.1.2 (June 16, 2014) ##
|
2
|
+
|
3
|
+
* Fix regression on eager loading association based on SQL query rather than
|
4
|
+
existing column.
|
5
|
+
|
6
|
+
Fixes #15480.
|
7
|
+
|
8
|
+
*Lauro Caetano*, *Carlos Antonio da Silva*
|
2
9
|
|
3
10
|
* Fix redefine a has_and_belongs_to_many inside inherited class
|
4
11
|
Fixing regression case, where redefining the same has_an_belongs_to_many
|
@@ -278,10 +285,6 @@
|
|
278
285
|
|
279
286
|
*Luke Steensen*
|
280
287
|
|
281
|
-
* Make possible to change `record_timestamps` inside Callbacks.
|
282
|
-
|
283
|
-
*Tieg Zaharia*
|
284
|
-
|
285
288
|
* Fixed error where .persisted? throws SystemStackError for an unsaved model with a
|
286
289
|
custom primary key that didn't save due to validation error.
|
287
290
|
|
@@ -83,14 +83,18 @@ module ActiveRecord
|
|
83
83
|
@through_records[record.object_id] ||= begin
|
84
84
|
ensure_mutable
|
85
85
|
|
86
|
-
through_record = through_association.build
|
86
|
+
through_record = through_association.build(*options_for_through_record)
|
87
87
|
through_record.send("#{source_reflection.name}=", record)
|
88
88
|
through_record
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
92
|
+
def options_for_through_record
|
93
|
+
[through_scope_attributes]
|
94
|
+
end
|
95
|
+
|
92
96
|
def through_scope_attributes
|
93
|
-
scope.where_values_hash(through_association.reflection.name.to_s)
|
97
|
+
scope.where_values_hash(through_association.reflection.name.to_s).except!(through_association.reflection.foreign_key)
|
94
98
|
end
|
95
99
|
|
96
100
|
def save_through_record(record)
|
@@ -104,11 +104,13 @@ module ActiveRecord
|
|
104
104
|
end
|
105
105
|
|
106
106
|
def association_key_type
|
107
|
-
@klass.column_types[association_key_name.to_s]
|
107
|
+
column = @klass.column_types[association_key_name.to_s]
|
108
|
+
column && column.type
|
108
109
|
end
|
109
110
|
|
110
111
|
def owner_key_type
|
111
|
-
@model.column_types[owner_key_name.to_s]
|
112
|
+
column = @model.column_types[owner_key_name.to_s]
|
113
|
+
column && column.type
|
112
114
|
end
|
113
115
|
|
114
116
|
def load_slices(slices)
|
data/lib/active_record/base.rb
CHANGED
@@ -309,8 +309,8 @@ module ActiveRecord #:nodoc:
|
|
309
309
|
include Locking::Optimistic
|
310
310
|
include Locking::Pessimistic
|
311
311
|
include AttributeMethods
|
312
|
-
include Timestamp
|
313
312
|
include Callbacks
|
313
|
+
include Timestamp
|
314
314
|
include Associations
|
315
315
|
include ActiveModel::SecurePassword
|
316
316
|
include AutosaveAssociation
|
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.
|
4
|
+
version: 4.1.2.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: 2014-
|
11
|
+
date: 2014-06-16 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.
|
19
|
+
version: 4.1.2.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.1.2.
|
26
|
+
version: 4.1.2.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.1.2.
|
33
|
+
version: 4.1.2.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.1.2.
|
40
|
+
version: 4.1.2.rc2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: arel
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|