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_shardwhen the class is not tenanted. Thecurrent_tenantmethod's job is to recognizes that sentinel value and returnnil, because Active Record itself does not recognizenilas 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
382 383 384 |
# File 'lib/active_record/tenanted/tenant.rb', line 382 def tenanted? true end |