composite_primary_keys 6.0.6 → 6.0.7
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
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: add6bac7bcaa5ca9b40c11e99df452b921b962ae
|
4
|
+
data.tar.gz: d1dd46cc248802f32c061f349c7d8f2158268cf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1dbf3af753f80209f70ccc15b2dfbc08a8bca681489a114bebf5c4d442f87c6b7dd06c4245ea83da7d02b904f1bc853634a8030deef31b0a95bd823a4f5a8efa
|
7
|
+
data.tar.gz: b293046f7cc2c73ca0edb6d462588988101c83f9fb34c6841281da4f614990952d4fefbdacd651f39540c3c425526253dc7821a208b7c7bf9a98797412e3dd1e
|
data/History.rdoc
CHANGED
@@ -48,12 +48,12 @@ module ActiveRecord
|
|
48
48
|
|
49
49
|
def add_cpk_where_values_hash
|
50
50
|
class << self
|
51
|
-
def where_values_hash
|
51
|
+
def where_values_hash(relation_table_name = table_name)
|
52
52
|
# CPK adds this so that it finds the Equality nodes beneath the And node:
|
53
53
|
nodes_from_and = with_default_scope.where_values.grep(Arel::Nodes::And).map {|and_node| and_node.children.grep(Arel::Nodes::Equality) }.flatten
|
54
54
|
|
55
55
|
equalities = (nodes_from_and + with_default_scope.where_values.grep(Arel::Nodes::Equality)).find_all { |node|
|
56
|
-
node.left.relation.name ==
|
56
|
+
node.left.relation.name == relation_table_name
|
57
57
|
}
|
58
58
|
|
59
59
|
Hash[equalities.map { |where| [where.left.name, where.right] }]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: composite_primary_keys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dr Nic Williams
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-10-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 4.0.
|
20
|
+
version: 4.0.6
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 4.0.
|
27
|
+
version: 4.0.6
|
28
28
|
description: Composite key support for ActiveRecord
|
29
29
|
email:
|
30
30
|
executables: []
|
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
207
|
version: '0'
|
208
208
|
requirements: []
|
209
209
|
rubyforge_project: compositekeys
|
210
|
-
rubygems_version: 2.
|
210
|
+
rubygems_version: 2.4.1
|
211
211
|
signing_key:
|
212
212
|
specification_version: 4
|
213
213
|
summary: Composite key support for ActiveRecord
|