union_of 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -1
- data/README.md +6 -1
- data/lib/union_of/reflection.rb +1 -1
- data/lib/union_of/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '013582567ec5890047fbb047929d1f0f60c96833fbbae50bb7b3e9c4a129dc19'
|
4
|
+
data.tar.gz: 8e1bc72667f7bfad2fe7cbb916bfa2e55d17a13db5d6cb8a72cfc94098376fcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68664c21fa3c8c546eb0fef4eaa51510240a23db67d7b5ebf498d8c10748a7d7fab45b0d744b336ef9a00e61bcd2d2acbe576de7c053286d3fc3a8624a8d85e5
|
7
|
+
data.tar.gz: 434c42dd62bdb056303651b780b17d5749ffd873ca7aa491554472d8c0041c6aa6a0ad7b4a3e60d5be81fc3f19a09b7bef583b30d524d0b43bd07177b370fb87
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -171,9 +171,14 @@ We use Postgres in production, but we do not actively use MySQL or MariaDB, so
|
|
171
171
|
there may be performance issues we are unaware of. If you stumble upon issues,
|
172
172
|
please open an issue or a PR.
|
173
173
|
|
174
|
+
## Acknowledgements
|
175
|
+
|
176
|
+
`union_of` was inspired by [`active_record_union`](https://github.com/brianhempel/active_record_union/).
|
177
|
+
For unions outside of associations, check it out.
|
178
|
+
|
174
179
|
## Is it any good?
|
175
180
|
|
176
|
-
Yes.
|
181
|
+
[Yes.](https://news.ycombinator.com/item?id=3067434)
|
177
182
|
|
178
183
|
## Contributing
|
179
184
|
|
data/lib/union_of/reflection.rb
CHANGED
@@ -17,7 +17,7 @@ module UnionOf
|
|
17
17
|
def union_reflections = union_sources.collect { active_record.reflect_on_association(_1) }
|
18
18
|
|
19
19
|
def join_scope(table, foreign_table, foreign_klass, alias_tracker = nil)
|
20
|
-
predicate_builder =
|
20
|
+
predicate_builder = ActiveRecord::PredicateBuilder.new(ActiveRecord::TableMetadata.new(klass, table))
|
21
21
|
scope_chain_items = join_scopes(table, predicate_builder)
|
22
22
|
klass_scope = klass_join_scope(table, predicate_builder)
|
23
23
|
|
data/lib/union_of/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: union_of
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zeke Gabrielse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
153
|
- !ruby/object:Gem::Version
|
154
154
|
version: '0'
|
155
155
|
requirements: []
|
156
|
-
rubygems_version: 3.
|
156
|
+
rubygems_version: 3.5.11
|
157
157
|
signing_key:
|
158
158
|
specification_version: 4
|
159
159
|
summary: Create associations that combine multiple Active Record associations using
|