activerecord 4.1.10.rc3 → 4.1.10.rc4
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: 526ac3b31ea3a4d5af87c48e958cd5eae698ee19
|
4
|
+
data.tar.gz: 063c77d4a73e9d4215704b54be91218b77b8210e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d88a239b41bf64a3f940b23149c8f04f5a4741d0bab918e57f82a9ebec3f1ac8cfcf42d601026628f969f8c2bf67d6f6bb926e0a34020a299bea766bfcba031
|
7
|
+
data.tar.gz: b03e8172ec595f0933140774f6f9ee7591f986ca60a9f1bd4efc166af48c8e12799711c9cfe75dabceae3546c13ab2e2199224aa012c76f1c0f7185e007caafc
|
@@ -129,11 +129,11 @@ module ActiveRecord
|
|
129
129
|
first_nth_or_last(:last, *args)
|
130
130
|
end
|
131
131
|
|
132
|
-
def take
|
132
|
+
def take(n = nil)
|
133
133
|
if loaded?
|
134
|
-
target.first
|
134
|
+
n ? target.take(n) : target.first
|
135
135
|
else
|
136
|
-
scope.take.tap do |record|
|
136
|
+
scope.take(n).tap do |record|
|
137
137
|
set_inverse_instance record if record.is_a? ActiveRecord::Base
|
138
138
|
end
|
139
139
|
end
|
@@ -85,7 +85,7 @@ module ActiveRecord
|
|
85
85
|
# This is basically emulating an Arel::Nodes::Casted
|
86
86
|
column = record.class.columns_hash[scope_item.to_s]
|
87
87
|
quoted_value = record.class.connection.quote(scope_value, column)
|
88
|
-
|
88
|
+
unless scope_value.nil?
|
89
89
|
node = Arel::Nodes::SqlLiteral.new(quoted_value)
|
90
90
|
end
|
91
91
|
|
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.10.
|
4
|
+
version: 4.1.10.rc4
|
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: 2015-03-
|
11
|
+
date: 2015-03-12 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.10.
|
19
|
+
version: 4.1.10.rc4
|
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.10.
|
26
|
+
version: 4.1.10.rc4
|
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.10.
|
33
|
+
version: 4.1.10.rc4
|
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.10.
|
40
|
+
version: 4.1.10.rc4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: arel
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|