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: cf7821e1dce524f20a81e982faa1042c1bb5cf0b
4
- data.tar.gz: 5112714e5ae73ba0335ac34aca8a7f5f699ba6a3
3
+ metadata.gz: add6bac7bcaa5ca9b40c11e99df452b921b962ae
4
+ data.tar.gz: d1dd46cc248802f32c061f349c7d8f2158268cf9
5
5
  SHA512:
6
- metadata.gz: 9944a233a344edfdf63b0bd1dfadf70074f241d4b1cce209aa1280307693e124d09b1bd54907ab94f7a23731c8e8b6ab693dee2246eb65475385a478728c5efd
7
- data.tar.gz: 7ec24c0880bbab735c1491bd3e6891692974190150deebfe57a7347502718d751f42f7a44ef28fd9161a3a47bb16721244bf7b829d3a0c6b29d7c7e60c8787a4
6
+ metadata.gz: 1dbf3af753f80209f70ccc15b2dfbc08a8bca681489a114bebf5c4d442f87c6b7dd06c4245ea83da7d02b904f1bc853634a8030deef31b0a95bd823a4f5a8efa
7
+ data.tar.gz: b293046f7cc2c73ca0edb6d462588988101c83f9fb34c6841281da4f614990952d4fefbdacd651f39540c3c425526253dc7821a208b7c7bf9a98797412e3dd1e
@@ -1,3 +1,7 @@
1
+ == 6.0.7 (2014-10-06)
2
+
3
+ * Support Rails 4.0.6 (Tom Hughes)
4
+
1
5
  == 6.0.6 (2014-05-26)
2
6
 
3
7
  * Don't refer to deprecated set_primary_keys in README (Henare Degan)
@@ -26,7 +26,7 @@ $:.unshift(File.dirname(__FILE__)) unless
26
26
 
27
27
  unless defined?(ActiveRecord)
28
28
  require 'rubygems'
29
- gem 'activerecord', '~>4.0.0'
29
+ gem 'activerecord', '~>4.0.6'
30
30
  require 'active_record'
31
31
  end
32
32
 
@@ -46,7 +46,7 @@ module CompositePrimaryKeys
46
46
  end
47
47
  end
48
48
 
49
- def update_record(attribute_names = @attributes.keys)
49
+ def _update_record(attribute_names = @attributes.keys)
50
50
  return super(attribute_names) unless composite?
51
51
 
52
52
  klass = self.class
@@ -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 == table_name
56
+ node.left.relation.name == relation_table_name
57
57
  }
58
58
 
59
59
  Hash[equalities.map { |where| [where.left.name, where.right] }]
@@ -2,7 +2,7 @@ module CompositePrimaryKeys
2
2
  module VERSION
3
3
  MAJOR = 6
4
4
  MINOR = 0
5
- TINY = 6
5
+ TINY = 7
6
6
  STRING = [MAJOR, MINOR, TINY].join('.')
7
7
  end
8
8
  end
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.6
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-05-27 00:00:00.000000000 Z
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.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.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.2.2
210
+ rubygems_version: 2.4.1
211
211
  signing_key:
212
212
  specification_version: 4
213
213
  summary: Composite key support for ActiveRecord