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 +5 -5
- data/History.rdoc +5 -0
- data/README.rdoc +1 -1
- data/lib/composite_primary_keys/relation/calculations.rb +4 -2
- data/lib/composite_primary_keys/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f06b556871f465285e08ae730e3a7b393a1a2342215083dec37e85ccb8e323f7
|
4
|
+
data.tar.gz: 2efcdf65030ce1463981c2e728988a35b4c5ed2f2e650c32aca2025b760cfc46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
22
|
-
|
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
|
|
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.
|
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:
|
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.
|
274
|
+
rubygems_version: 2.7.3
|
275
275
|
signing_key:
|
276
276
|
specification_version: 4
|
277
277
|
summary: Composite key support for ActiveRecord
|