counter_culture 3.5.2 → 3.5.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: 9cb364451d9ed9870da702f56a916db61dd29792766ace4732eb915ef7e1d0fd
4
- data.tar.gz: 547fe6bfa9068ff65f5fa48a3afe1a847956ab04150a97f316f147c510c6bba3
3
+ metadata.gz: 7c2646918dbfacac2d3d3f923c601111bfcf58b46b1ba0ed035e9f8a557b9577
4
+ data.tar.gz: 52cd080e6eb8beb589c8cfb52e73ad62fe333caea4c91d9098cbb5a78ff8f30f
5
5
  SHA512:
6
- metadata.gz: 910b10128b0d1fab9145f12d77262cd007e0cfe3d6730d0d6e0606e4e4fa59de59822ad690211fe6563604bfdb7fe3f9d68cd10d9419c6b9b01c823f0eb6a307
7
- data.tar.gz: 611498966bc1a81b6177909ccae783cc9c4e598337aaeb02eb9db3586c06748ce02e555c6f357a5cb4c63a73fad902d52e321f9f0e8af6212c776c7d6a9a9150
6
+ metadata.gz: b8736342d26f93e1cba9372057d941b216efda9bcefe8f56215b001b987e0a557f82e632376879a9006bf2b1d58cf876682f23efe7f6fb3912232d8de58442ea
7
+ data.tar.gz: a92f08b7574babb1c2e79b634b3f418f3e37e7d8b83abbddd8d1d9e909e4c073034b1f1b4f5534de5d9136967dc1863fcfec0a2f49e1c7620930d5c5ece617e9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 3.5.3 (February 16, 2024)
2
+
3
+ Bugfixes:
4
+ - Correct polymorphic table name alias reference in join clauses (#388)
5
+
1
6
  ## 3.5.2 (January 16, 2024)
2
7
 
3
8
  Bugfixes:
@@ -274,13 +274,13 @@ module CounterCulture
274
274
  # child in a Single Table Inheritance
275
275
  if reflect.active_record.column_names.include?('type') &&
276
276
  !model.descends_from_active_record?
277
- joins_sql += " AND #{target_table}.type IN ('#{model.name}')"
277
+ joins_sql += " AND #{target_table_alias}.type IN ('#{model.name}')"
278
278
  end
279
279
  if polymorphic?
280
280
  # adds 'type' condition to JOIN clause if the current model is a
281
281
  # polymorphic relation
282
282
  # NB only works for one-level relations
283
- joins_sql += " AND #{target_table}.#{reflect.foreign_type} = '#{relation_class.name}'"
283
+ joins_sql += " AND #{target_table_alias}.#{reflect.foreign_type} = '#{relation_class.name}'"
284
284
  end
285
285
  if index == reverse_relation.size - 1
286
286
  # conditions must be applied to the join on which we are counting
@@ -1,3 +1,3 @@
1
1
  module CounterCulture
2
- VERSION = '3.5.2'.freeze
2
+ VERSION = '3.5.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: counter_culture
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.2
4
+ version: 3.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magnus von Koeller
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-16 00:00:00.000000000 Z
11
+ date: 2024-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord