composable-tenant 0.0.11 → 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: af3b6356b5811f4e0d2c3fbf07da98edc2e24d6bbcbe7870a28520a6f7e65695
4
- data.tar.gz: 81b4968f3b9312d16e287916292a394865a7a408e0960faf9871030188956dc2
3
+ metadata.gz: a8dae1b135ec29fef3b9f8d961933c87f57030dd82ea6d119f01142967359aac
4
+ data.tar.gz: 7bad5b0d57d941208138b48ac7a5fa1d754b44cf0dae3325a2290ef69685f229
5
5
  SHA512:
6
- metadata.gz: a6ef23116391498df3854928e8f93775755a66a787dc9a037a40a912cb5627a5754e1c823e802f3b97efc0d7180124a475a1894cf73ef67c5dbb7dad58014172
7
- data.tar.gz: 878586dd9df55f7f914f92514a25e250f4c824fb35c7739f9b78a802c16342e569bd7c41728d8580469206174464620f2d0264a87a95bc28627b769b558cf73f
6
+ metadata.gz: e76174a1bd05a6ef778669c5f531d1a1f9d7c1109af0b099d12d107872f7ac7e9268816434f33320cea01167ff068ae5398a1043d655585a9c6e980223ea8f2b
7
+ data.tar.gz: 15dd17c6aad45aa9c486115c5080f7a093d2ab6be5c807a2f02409bcf362935f3b4151a0d22f917a69409b0a3c93b703463d0e4ad6fd6248041846582e50b0d9
@@ -10,7 +10,7 @@ module Composable
10
10
  module VERSION
11
11
  MAJOR = 0
12
12
  MINOR = 0
13
- TINY = 11
13
+ TINY = 13
14
14
  PRE = nil
15
15
 
16
16
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
@@ -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.11
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: 2022-12-23 00:00:00.000000000 Z
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.3.7
66
- signing_key:
63
+ rubygems_version: 3.6.2
67
64
  specification_version: 4
68
65
  summary: Tenant Composable Object
69
66
  test_files: []