composite_primary_keys 11.0.0.beta2 → 11.0.0.beta3

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
- SHA1:
3
- metadata.gz: a08042363d370a0d0dfd0a9299fab51dd7eeb82d
4
- data.tar.gz: 17ee927164d58a2f018cbab91d6019b19870ba6d
2
+ SHA256:
3
+ metadata.gz: f06b556871f465285e08ae730e3a7b393a1a2342215083dec37e85ccb8e323f7
4
+ data.tar.gz: 2efcdf65030ce1463981c2e728988a35b4c5ed2f2e650c32aca2025b760cfc46
5
5
  SHA512:
6
- metadata.gz: b59369b4e4da7602adbdd189849ff00fb6759c3f772d46668b613323fb69b0f8bd853318800622ea0d9757ef98dd68d21e0c5150b5f68c508f2bcc412e1b6a0a
7
- data.tar.gz: ffeee036dfe8ee31a6cbd184feccf00109d4d871200d7f9568e74823f1e5acc57ac2069792e01e4a29a53eeb5c1c3d7c19d0bc94effb0e8510aebe19e65f3641
6
+ metadata.gz: 4774876569874db813bfbc549460c8e4ea4d67c35261e8be1b2844ba776604d0435a87875d05326212f76b4573a097cecc0c19dac0f86e3f501cf7d81b73db6b
7
+ data.tar.gz: b493eaae3998c02850addc163eab57e1548a8d4ec608cd8df6d1136d6b59b8fddbbb58410861a8777ed80f7d65a2d8c6db171b0247b29ceb4b21e5ddba543f5d
data/History.rdoc CHANGED
@@ -1,3 +1,8 @@
1
+ == 11.0.0.beta3 (2017-12-10)
2
+
3
+ * Fix typo in Readme.doc (Lopez Lucien)
4
+ * Fix Calculations#execute_simple_calculation for ActiveRecord 5.2.beta2 (Charlie Savage)
5
+
1
6
  == 11.0.0.beta2 (2017-12-10)
2
7
 
3
8
  * Minor updates for ActiveRecord 5.2.beta2 support (Charlie Savage)
data/README.rdoc CHANGED
@@ -60,7 +60,7 @@ That is, associations can include composite keys too. All Rails association typ
60
60
  == Usage
61
61
 
62
62
  Once you’ve created your models to specify composite primary keys (such as the Membership class)
63
- and associations (such as MembershipStatus#membership), you can uses them like any normal model
63
+ and associations (such as MembershipStatus#membership), you can use them like any normal model
64
64
  with associations.
65
65
 
66
66
  But first, lets check out our primary keys.
@@ -18,8 +18,10 @@ module CompositePrimaryKeys
18
18
  column_alias = column_name
19
19
 
20
20
  # CPK
21
- #if operation == "count" && has_limit_or_offset?
22
- if operation == "count"
21
+ if self.composite? && operation == "count"
22
+ relation = unscope(:order)
23
+ query_builder = build_count_subquery(relation, column_name, distinct)
24
+ elsif operation == "count" && has_limit_or_offset?
23
25
  # Shortcut when limit is zero.
24
26
  return 0 if limit_value == 0
25
27
 
@@ -3,6 +3,6 @@ module CompositePrimaryKeys
3
3
  MAJOR = 11
4
4
  MINOR = 0
5
5
  TINY = 0
6
- STRING = [MAJOR, MINOR, TINY, 'beta2'].join('.')
6
+ STRING = [MAJOR, MINOR, TINY, 'beta3'].join('.')
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: composite_primary_keys
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.0.0.beta2
4
+ version: 11.0.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charlie Savage
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-10 00:00:00.000000000 Z
11
+ date: 2018-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -271,7 +271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
271
271
  version: 1.3.1
272
272
  requirements: []
273
273
  rubyforge_project:
274
- rubygems_version: 2.6.13
274
+ rubygems_version: 2.7.3
275
275
  signing_key:
276
276
  specification_version: 4
277
277
  summary: Composite key support for ActiveRecord