Exception: Apartment::PendingMigrationError

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

Overview

Raised in development when a tenant has pending migrations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tenant = nil) ⇒ PendingMigrationError

Returns a new instance of PendingMigrationError.



71
72
73
74
75
76
77
78
79
80
# File 'lib/apartment/errors.rb', line 71

def initialize(tenant = nil)
  @tenant = tenant
  super(
    if tenant
      "Tenant '#{tenant}' has pending migrations. Run apartment:migrate to update."
    else
      'Tenant has pending migrations. Run apartment:migrate to update.'
    end
  )
end

Instance Attribute Details

#tenantObject (readonly)

Returns the value of attribute tenant.



69
70
71
# File 'lib/apartment/errors.rb', line 69

def tenant
  @tenant
end