Exception: Apartment::DefaultTenantNotConfigured

Inherits:
ApartmentError
  • Object
show all
Defined in:
lib/apartment/errors.rb

Overview

Raised by Apartment::Tenant.require_default_tenant! and with_default_tenant when no default_tenant is configured: a pinned keyspace needs an explicitly named anchor, not nil.

Instance Method Summary collapse

Constructor Details

#initialize(message = nil) ⇒ DefaultTenantNotConfigured

Returns a new instance of DefaultTenantNotConfigured.



119
120
121
122
123
124
125
# File 'lib/apartment/errors.rb', line 119

def initialize(message = nil)
  super(
    message ||
      'require_default_tenant! needs a configured Apartment.config.default_tenant; ' \
      'none is set. A pinned keyspace requires an explicitly named default tenant.'
  )
end