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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f4f7678ce36e47c795736985a53b7656a2223afbd0b119702a2ccd41ff2d523
4
- data.tar.gz: 282cfccb56d1760a2ae9d2e55bc4706555684086c0fc906161eefaf663d13865
3
+ metadata.gz: ae35b0a41cb186989dbb8f76fb8dbfa11604782e6b795fca0ac5e50e66bdd3fa
4
+ data.tar.gz: 88b9bb3f9cf86b143d997502d0ae997606652d813541259c684d76c7c379b40d
5
5
  SHA512:
6
- metadata.gz: 8ea922c85bd6098946058bbafe2cf3b93b7012535af34932eb2168b0569b19b86d25a3fadf97e30265e49132a746dffab93a30889a8e29d6683fc71d03291f04
7
- data.tar.gz: 68daa6ffcbe5ddc91e61b68a662bc52352a860eb64e31a511473177b0454497e937f947e7cd3300844faf34b47b49904cba0292043d7e8c1c81c6d8db7b08c7c
6
+ metadata.gz: a6239fb1c253b895b3bf35f640fde0f600cc853f9348839108536abf2eed887c71c763b1c1ebb71fa4d2eff07bb77b953732641edb4dde3f271127d25d76287e
7
+ data.tar.gz: fde9049ba6c66da3901eb99352b3e938130a46e8a24e85c42a04a92c4c641188e112299ea2882b632fe3f6d833f300d9bc8f7aa52928a69b4df7653377af268f
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Scopiform
2
- VERSION = '0.2.5'.freeze
2
+ VERSION = '0.2.6'.freeze
3
3
  end
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.5
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-14 00:00:00.000000000 Z
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: sqlite3
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: warning
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: composite_primary_keys
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
- rubygems_version: 3.0.3
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