activerecord 4.2.1.rc3 → 4.2.1.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: da45d248e73ea28250ec5229cc55cfd2498612ce
4
- data.tar.gz: ed8e37df9d000003c318f40bf5662d2feaa85c29
3
+ metadata.gz: 4a8eab7ce6ffbcc6b4f14d22bc5472f22de42c23
4
+ data.tar.gz: 44c448ec12deeb1b717ed9996d2eea68cb033744
5
5
  SHA512:
6
- metadata.gz: c77da230a06f4057899e9f3da152e02de221de3b828b341c26c9a4bbeeb46be64dbb6ad878393741cddde8166dd3e5ad4ad88a4044dcddd3f018aee31eae5e2e
7
- data.tar.gz: 1e57f1e86b1a060b38d47f3a3bd2547ab88dd5c600bc250b6e19709a6aae45852d2eb8336907e7ab28b47630bcb631d6a94fcba60e362b32d93ef9911cc175e1
6
+ metadata.gz: 1d8ca10a41454836022a8dc958a30732042f323f370d365a32d8cf3495d22689e206ba01f40ec4938f890b7a7b6413e82c522b7c40f2b8ae551298ed740b3370
7
+ data.tar.gz: 1713535ba079f67a220483da149ae50688d0e5ca1fcc195a2865d6a1ed4f23b43eed2de8f10bea57c503047f71b25ff4061a33698eb7985f6c9535e9d1b89561
@@ -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
@@ -227,8 +227,8 @@ module ActiveRecord
227
227
  @association.last(*args)
228
228
  end
229
229
 
230
- def take
231
- @association.take
230
+ def take(n = nil)
231
+ @association.take(n)
232
232
  end
233
233
 
234
234
  # Returns a new object of the collection type that has been instantiated
@@ -8,7 +8,7 @@ module ActiveRecord
8
8
  MAJOR = 4
9
9
  MINOR = 2
10
10
  TINY = 1
11
- PRE = "rc3"
11
+ PRE = "rc4"
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.2.1.rc3
4
+ version: 4.2.1.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-02 00:00:00.000000000 Z
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.2.1.rc3
19
+ version: 4.2.1.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.2.1.rc3
26
+ version: 4.2.1.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.2.1.rc3
33
+ version: 4.2.1.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.2.1.rc3
40
+ version: 4.2.1.rc4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: arel
43
43
  requirement: !ruby/object:Gem::Requirement