activerecord-multi-tenant 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -1
- data/lib/activerecord-multi-tenant/multi_tenant.rb +2 -2
- data/lib/activerecord-multi-tenant/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6da68db2d8d58cc00bc0fd9de50b85544fff943596c4ed7fb9211380419e1b1b
|
4
|
+
data.tar.gz: a5126bdd3b733a6e58c0c5d1e63e7bfe27b76a18fd790219ee08641379019336
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69be1d704a41ee78b28c9f23cb8bb1f606a97146c979ca087eeef1d43fa4a482bacedc21317677862f427567d98abcc4199f029eb04719b2dab363bb29a2160d
|
7
|
+
data.tar.gz: a6495adf22bbd72f03e15f8056e57c9dbabfaab9dde1b15fc3365794a1a8c25f624e094e82de2b7ed1648dcad990b410b6f3b97e6369534aa7ea6ee528505360
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## 2.1.
|
3
|
+
## 2.1.2 2022-10-26
|
4
|
+
* Fixes issue when wraping methods that require a block [#162](https://github.com/citusdata/activerecord-multi-tenant/pull/162)
|
5
|
+
|
6
|
+
## 2.1.1 2022-10-20
|
4
7
|
* Fix query building for models with mismatched partition_keys [#150](https://github.com/citusdata/activerecord-multi-tenant/pull/150)
|
5
8
|
* Identify tenant even if class name is nonstandard [#152](https://github.com/citusdata/activerecord-multi-tenant/pull/152)
|
6
9
|
* Add current_tenant_id to WHERE clauses when calling methods on activerecord instance or its associations [#154](https://github.com/citusdata/activerecord-multi-tenant/pull/154)
|
@@ -117,9 +117,9 @@ module MultiTenant
|
|
117
117
|
alias_method :#{original_method_name}, :#{method_name}
|
118
118
|
def #{method_name}(*args, &block)
|
119
119
|
if MultiTenant.multi_tenant_model_for_table(#{owner}.class.table_name).present? && #{owner}.persisted? && MultiTenant.current_tenant_id.nil?
|
120
|
-
MultiTenant.with(#{owner}.public_send(#{owner}.class.partition_key)) { #{original_method_name}(*args) }
|
120
|
+
MultiTenant.with(#{owner}.public_send(#{owner}.class.partition_key)) { #{original_method_name}(*args, &block) }
|
121
121
|
else
|
122
|
-
#{original_method_name}(*args)
|
122
|
+
#{original_method_name}(*args, &block)
|
123
123
|
end
|
124
124
|
end
|
125
125
|
CODE
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-multi-tenant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Citus Data
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|