Module: ActiveRecord::Tenanted::Tenant
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/active_record/tenanted/tenant.rb
Constant Summary collapse
- UNTENANTED_SENTINEL =
This is a sentinel value used to indicate that the class is not currently tenanted.
It’s the default value returned by ‘current_shard` when the class is not tenanted. The `current_tenant` method’s job is to recognizes that sentinel value and return ‘nil`, because Active Record itself does not recognize `nil` as a valid shard value.
Class.new do # :nodoc: def inspect "ActiveRecord::Tenanted::Tenant::UNTENANTED_SENTINEL" end def to_s "(untenanted)" end end.new.freeze
- CONNECTION_POOL_CREATION_LOCK =
:nodoc:
Thread::Mutex.new
Instance Method Summary collapse
Instance Method Details
#tenanted? ⇒ Boolean
278 279 280 |
# File 'lib/active_record/tenanted/tenant.rb', line 278 def tenanted? true end |