activerecord 4.1.14.2 → 4.1.15.rc1
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: 4514b18c44984aca0077697df0b7ef368749aa06
|
4
|
+
data.tar.gz: bceae7bb43c0da51ad533c29db67e72c43b5529d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 515d9171802370bcf61490d585f03f0f067ecb25fa4eee20dbd810a1e6f12673e9bc8cd6a113db560c4f60613ace5ef338796218a1e489e7db5f46a224f42cbd
|
7
|
+
data.tar.gz: 968f179b667463b9fad444b3e0609ca7de5c93db8bf0b193513e7e7d938a4d8acfe13e02d247652c9d875c4f57b20a32ad61734fa2cf2352252048fe0a77f052
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
## Rails 4.1.15.rc1 (March 01, 2016) ##
|
2
|
+
|
3
|
+
* Fixes custom primary keys for associations when calling `Relation#where`
|
4
|
+
|
5
|
+
Fixes #23327.
|
6
|
+
|
7
|
+
*Rick Song*
|
8
|
+
|
9
|
+
* No longer pass deprecated option `-i` to `pg_dump`.
|
10
|
+
|
11
|
+
*Paul Sadauskas*
|
12
|
+
|
13
|
+
|
1
14
|
## Rails 4.1.14.2 (February 26, 2016) ##
|
2
15
|
|
3
16
|
* No changes.
|
@@ -56,7 +56,8 @@ module ActiveRecord
|
|
56
56
|
# For polymorphic relationships, find the foreign key and type:
|
57
57
|
# PriceEstimate.where(estimate_of: treasure)
|
58
58
|
if klass && reflection = klass._reflect_on_association(column.to_sym)
|
59
|
-
|
59
|
+
base_class = polymorphic_base_class_from_value(value)
|
60
|
+
if reflection.polymorphic? && base_class
|
60
61
|
queries << build(table[reflection.foreign_type], base_class)
|
61
62
|
end
|
62
63
|
|
@@ -12,6 +12,7 @@ module ActiveRecord
|
|
12
12
|
|
13
13
|
# Merges in the conditions from <tt>other</tt>, if <tt>other</tt> is an <tt>ActiveRecord::Relation</tt>.
|
14
14
|
# Returns an array representing the intersection of the resulting records with <tt>other</tt>, if <tt>other</tt> is an array.
|
15
|
+
#
|
15
16
|
# Post.where(published: true).joins(:comments).merge( Comment.where(spam: false) )
|
16
17
|
# # Performs a single join query with both where conditions.
|
17
18
|
#
|
@@ -37,11 +38,14 @@ module ActiveRecord
|
|
37
38
|
end
|
38
39
|
|
39
40
|
def merge!(other) # :nodoc:
|
40
|
-
if
|
41
|
+
if other.is_a?(Hash)
|
42
|
+
Relation::HashMerger.new(self, other).merge
|
43
|
+
elsif other.is_a?(Relation)
|
44
|
+
Relation::Merger.new(self, other).merge
|
45
|
+
elsif other.respond_to?(:to_proc)
|
41
46
|
instance_exec(&other)
|
42
47
|
else
|
43
|
-
|
44
|
-
klass.new(self, other).merge
|
48
|
+
raise ArgumentError, "#{other.inspect} is not an ActiveRecord::Relation"
|
45
49
|
end
|
46
50
|
end
|
47
51
|
|
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.
|
4
|
+
version: 4.1.15.rc1
|
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
|
+
date: 2016-03-01 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.
|
19
|
+
version: 4.1.15.rc1
|
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.
|
26
|
+
version: 4.1.15.rc1
|
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.
|
33
|
+
version: 4.1.15.rc1
|
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.
|
40
|
+
version: 4.1.15.rc1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: arel
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -243,9 +243,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
243
243
|
version: 1.9.3
|
244
244
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
245
245
|
requirements:
|
246
|
-
- - "
|
246
|
+
- - ">"
|
247
247
|
- !ruby/object:Gem::Version
|
248
|
-
version:
|
248
|
+
version: 1.3.1
|
249
249
|
requirements: []
|
250
250
|
rubyforge_project:
|
251
251
|
rubygems_version: 2.5.1
|