active_record_aliased_joins 0.1.2 → 0.1.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
2
  SHA256:
3
- metadata.gz: 98d045644c3e8aae0c9d63c1e85555a1cee684190313c190fc5cd091c99898f6
4
- data.tar.gz: bd247d692d109a8a4140fa9d29efcea75b8dbbf512e7d7accf81f322ab69de22
3
+ metadata.gz: bc612630e193bf7a8d30dfa1ca31488616e8241caa294bd63bdabd50950cb6b4
4
+ data.tar.gz: cdc77df665f7c39bf2151308494671d2797e2acad37e5063a7f983821f12fdb3
5
5
  SHA512:
6
- metadata.gz: d6686baf5c1d6dec938a4fb8f77dd06df634e064f8eae9d5e2587b1ab3772bbb03f50e6d9809b7675ef4372024c822d0b58d0b45beafd3a4db581de7b411a9b9
7
- data.tar.gz: 37025699218bbfce0319f6c2750731f4af082c83f7288f3acc2b97cc3887e6255b86b44ba6c908fa290f4a2434a22a6c1f2b9a0a2b9aad3bf5456330d95cd3e9
6
+ metadata.gz: 633895395e681539bfb9491a967839b5d3f4031b12e62dd90c1dc17a918e396b41b09958089d7c20f002c35ae069e202d4028d9b730d792ddf6136d7503fc9e5
7
+ data.tar.gz: 8bcc0e7c26e63a0b210ad9f26750177957a7bfd16d5a133794fa02eab20c08f69fdabd5d031f795d0a85caf8501d9049cb11946310e0f774bb116d8ad12aa3bf
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecordAliasedJoins
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
@@ -56,7 +56,7 @@ module ActiveRecordAliasedJoins
56
56
  s = arel_table
57
57
  related_klass = reflection.klass
58
58
  r = related_klass.arel_table.alias(alias_name)
59
- s.join(r, join_klass).on(s[reflection.foreign_key.to_sym].eq(r[primary_key.to_sym]))
59
+ s.join(r, join_klass).on(s[reflection.foreign_key.to_sym].eq(r[related_klass.primary_key.to_sym]))
60
60
  end
61
61
 
62
62
  def join_with_alias_through(reflection, association_name, alias_name, join_klass = Nodes::InnerJoin)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_aliased_joins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Larry Gebhardt
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-20 00:00:00.000000000 Z
11
+ date: 2023-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord