composable-tenant 0.0.12 → 0.0.13
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8dae1b135ec29fef3b9f8d961933c87f57030dd82ea6d119f01142967359aac
|
4
|
+
data.tar.gz: 7bad5b0d57d941208138b48ac7a5fa1d754b44cf0dae3325a2290ef69685f229
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e76174a1bd05a6ef778669c5f531d1a1f9d7c1109af0b099d12d107872f7ac7e9268816434f33320cea01167ff068ae5398a1043d655585a9c6e980223ea8f2b
|
7
|
+
data.tar.gz: 15dd17c6aad45aa9c486115c5080f7a093d2ab6be5c807a2f02409bcf362935f3b4151a0d22f917a69409b0a3c93b703463d0e4ad6fd6248041846582e50b0d9
|
@@ -22,6 +22,11 @@ module Composable
|
|
22
22
|
foreign_key = options.fetch(:foreign_key, "#{tenant}_id").to_sym
|
23
23
|
primary_key = options.fetch(:primary_key, :id).to_sym
|
24
24
|
|
25
|
+
# The association will not have its presence validated.
|
26
|
+
# This is because the tenant is set by the tenant= method,
|
27
|
+
# which is called by the before_validation callback. Prevents extra query.
|
28
|
+
options[:optional] = true if options[:optional].nil?
|
29
|
+
|
25
30
|
belongs_to tenant, scope, **options
|
26
31
|
|
27
32
|
default_scope lambda {
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: composable-tenant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jairo Vazquez
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-08-09 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: activerecord
|
@@ -47,7 +46,6 @@ metadata:
|
|
47
46
|
homepage_uri: https://github.com/jairovm/composables
|
48
47
|
source_code_uri: https://github.com/jairovm/composables/tree/main/composable-tenant
|
49
48
|
changelog_uri: https://github.com/jairovm/composables/tree/main/composable-tenant/CHANGELOG.md
|
50
|
-
post_install_message:
|
51
49
|
rdoc_options: []
|
52
50
|
require_paths:
|
53
51
|
- lib
|
@@ -62,8 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
60
|
- !ruby/object:Gem::Version
|
63
61
|
version: '0'
|
64
62
|
requirements: []
|
65
|
-
rubygems_version: 3.
|
66
|
-
signing_key:
|
63
|
+
rubygems_version: 3.6.2
|
67
64
|
specification_version: 4
|
68
65
|
summary: Tenant Composable Object
|
69
66
|
test_files: []
|