activerecord_nested_scope 1.1.0 → 1.1.1

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
  SHA256:
3
- metadata.gz: b1a5162acf18c8e70f87b21f4dc4df15d5a1c5a32de4c63aaf949b3a8b60c5c3
4
- data.tar.gz: 34e4a88f240b89d517986ad960f11f27874afc8e186b79b7e4f0b7878e7e7191
3
+ metadata.gz: 873946315cf0ac4297ef8a4b16db871e009886c757f380006a4b980d67fbf59b
4
+ data.tar.gz: a05ed25fd35de7eb5b3418899f781105da5e8624b200da1689588f50cb00007b
5
5
  SHA512:
6
- metadata.gz: a2c93ab0ebd9e53f7b8aee4d1780974b989b5d232550f5feb30dad0a71c170c467e63563ab7774116953bc4aa809f5ffd7f01e0ed0f5b68a11f0a9394d073298
7
- data.tar.gz: 9d6222989f2dc3d5c14d622f188319de79d7d61f8a60e1d6a686d689e62dd8d958aaddb2f15c3e26684e8cfc7fc23ed066801ab4debee02922394d7b25ecb6f2
6
+ metadata.gz: fe922e968ee53fce622f4fe149582167b6b16336c09d49befb57476ab5d79ee5a8acf2811390ee06d87dff2b676180a220a7579ffb672e47e1d509a0b44bf65a
7
+ data.tar.gz: c3954c2d58bdd3ef006556c0fb84ce613b3249784cad10a829e3eb1ce46cd5cad594ff7ef85070ba33bf025cae5c3457151680bf03ff9ced9fe0e1fb38765c91
data/.gitignore CHANGED
@@ -9,7 +9,7 @@ doc/
9
9
  pkg/
10
10
  spec/reports/
11
11
  spec/dummy/config/database.yml
12
- spec/dummy/db/schema.rb
12
+ spec/dummy/db/schema*.rb
13
13
  spec/dummy/db/*.sqlite3
14
14
  spec/dummy/log/*.log
15
15
  spec/dummy/tmp/*
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.1.1
4
+
5
+ * Fix query for associations with primary key option.
6
+
3
7
  ## 1.1.0
4
8
 
5
9
  * Add short query feature for simple belongs_to association.
@@ -33,14 +33,14 @@ module ActiveRecordNestedScope
33
33
  return node.klass.none unless child
34
34
 
35
35
  relation = child_relation(child, select: node.reflection.foreign_key)
36
- node.klass.where(node.klass.primary_key => relation)
36
+ node.klass.where(node.reflection.active_record_primary_key => relation)
37
37
  end
38
38
 
39
39
  def belongs_to_relation(node)
40
40
  child = node.children.first
41
41
  return node.klass.none unless child
42
42
 
43
- relation = child_relation(child, select: node.reflection.klass.primary_key)
43
+ relation = child_relation(child, select: node.reflection.active_record_primary_key)
44
44
  node.klass.where(node.reflection.foreign_key => relation)
45
45
  end
46
46
 
@@ -1,3 +1,3 @@
1
1
  module ActiveRecordNestedScope
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord_nested_scope
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshikazu Kaneta
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-22 00:00:00.000000000 Z
11
+ date: 2020-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord