scopiform 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/scopiform/utilities.rb +1 -1
- data/lib/scopiform/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae35b0a41cb186989dbb8f76fb8dbfa11604782e6b795fca0ac5e50e66bdd3fa
|
4
|
+
data.tar.gz: 88b9bb3f9cf86b143d997502d0ae997606652d813541259c684d76c7c379b40d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6239fb1c253b895b3bf35f640fde0f600cc853f9348839108536abf2eed887c71c763b1c1ebb71fa4d2eff07bb77b953732641edb4dde3f271127d25d76287e
|
7
|
+
data.tar.gz: fde9049ba6c66da3901eb99352b3e938130a46e8a24e85c42a04a92c4c641188e112299ea2882b632fe3f6d833f300d9bc8f7aa52928a69b4df7653377af268f
|
data/lib/scopiform/utilities.rb
CHANGED
@@ -21,7 +21,7 @@ module Scopiform
|
|
21
21
|
applied = ctx.association.klass.send(method, value, ctx: ScopeContext.from(ctx).set(ctx.association_arel_table))
|
22
22
|
|
23
23
|
if is_root
|
24
|
-
ctx.scopes.reduce(active_record.joins(ctx.joins).merge(applied)) { |chain, scope| chain.merge(scope) }
|
24
|
+
ctx.scopes.reduce(active_record.distinct.joins(ctx.joins).merge(applied)) { |chain, scope| chain.merge(scope) }
|
25
25
|
else
|
26
26
|
ctx.scopes.reduce(active_record.all.merge(applied)) { |chain, scope| chain.merge(scope) }
|
27
27
|
end
|
data/lib/scopiform/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scopiform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jayce.pulsipher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01
|
11
|
+
date: 2021-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: composite_primary_keys
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: sqlite3
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: warning
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -123,7 +123,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
|
-
|
126
|
+
rubyforge_project:
|
127
|
+
rubygems_version: 2.7.7
|
127
128
|
signing_key:
|
128
129
|
specification_version: 4
|
129
130
|
summary: Generate scope methods to ActiveRecord classes based on columns and associations
|