composite_primary_keys 10.0.2 → 10.0.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 29b9cbec2b60475dd15921781f0cd0d13bcc926a7e30d5044b6eec3785c58d33
|
4
|
+
data.tar.gz: 571a02475e5baaa6a09893c98de1d370040579ce0c57dd3d9a1df098cd77f436
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 114b0f20ab6ec000a62c4186927b72f5600afad9e6ff79a9d7e7d60d3bf07b38a20bca74fd4d2b81e892e252692f5c892ee860affc134cfda76bae87614073da
|
7
|
+
data.tar.gz: 26e7a765dbbff53d865073b83dfc1a876219aa6067b33216134d7f8d90dd0451a0c5534783e89f443555abb4c76bc4596c26de3e20db537de6d6fc91c06901fa
|
data/History.rdoc
CHANGED
@@ -18,7 +18,7 @@ module ActiveRecord
|
|
18
18
|
end
|
19
19
|
|
20
20
|
silence_warnings do
|
21
|
-
def instantiate(result_set,
|
21
|
+
def instantiate(result_set, &block)
|
22
22
|
primary_key = aliases.column_alias(join_root, join_root.primary_key)
|
23
23
|
|
24
24
|
seen = Hash.new { |i, object_id|
|
@@ -47,7 +47,7 @@ module ActiveRecord
|
|
47
47
|
primary_key ? row_hash[primary_key] : row_hash
|
48
48
|
end
|
49
49
|
|
50
|
-
parent = parents[parent_key] ||= join_root.instantiate(row_hash, column_aliases)
|
50
|
+
parent = parents[parent_key] ||= join_root.instantiate(row_hash, column_aliases, &block)
|
51
51
|
construct(parent, join_root, row_hash, result_set, seen, model_cache, aliases)
|
52
52
|
}
|
53
53
|
end
|
data/test/fixtures/tariffs.yml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
flat:
|
2
|
-
tariff_id: 1
|
3
|
-
start_date: <%= Date.today.to_s(:db) %>
|
4
|
-
amount: 50
|
5
|
-
|
6
|
-
free:
|
7
|
-
tariff_id: 2
|
8
|
-
start_date: <%= Date.today.to_s(:db) %>
|
9
|
-
amount: 0
|
10
|
-
|
11
|
-
flat_future:
|
12
|
-
tariff_id: 1
|
13
|
-
start_date: <%= Date.today.next.to_s(:db) %>
|
14
|
-
amount: 100
|
1
|
+
flat:
|
2
|
+
tariff_id: 1
|
3
|
+
start_date: <%= Date.today.to_s(:db) %>
|
4
|
+
amount: 50
|
5
|
+
|
6
|
+
free:
|
7
|
+
tariff_id: 2
|
8
|
+
start_date: <%= Date.today.to_s(:db) %>
|
9
|
+
amount: 0
|
10
|
+
|
11
|
+
flat_future:
|
12
|
+
tariff_id: 1
|
13
|
+
start_date: <%= Date.today.next.to_s(:db) %>
|
14
|
+
amount: 100
|
15
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: composite_primary_keys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.0.
|
4
|
+
version: 10.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charlie Savage
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 5.1.0
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 5.1.
|
22
|
+
version: 5.1.5
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 5.1.0
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 5.1.
|
32
|
+
version: 5.1.5
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rake
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -279,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
279
279
|
version: '0'
|
280
280
|
requirements: []
|
281
281
|
rubyforge_project:
|
282
|
-
rubygems_version: 2.
|
282
|
+
rubygems_version: 2.7.3
|
283
283
|
signing_key:
|
284
284
|
specification_version: 4
|
285
285
|
summary: Composite key support for ActiveRecord
|