Class: Apartment::Adapters::Mysql2Adapter

Inherits:
AbstractAdapter show all
Defined in:
lib/apartment/adapters/mysql2_adapter.rb

Instance Attribute Summary

Attributes inherited from AbstractAdapter

#default_tenant

Instance Method Summary collapse

Methods inherited from AbstractAdapter

#create, #current, #current_database, #current_tenant, #drop, #each, #process, #process_excluded_models, #reset, #seed_data, #switch, #switch!

Constructor Details

#initialize(config) ⇒ Mysql2Adapter

Returns a new instance of Mysql2Adapter


16
17
18
19
20
# File 'lib/apartment/adapters/mysql2_adapter.rb', line 16

def initialize(config)
  super

  @default_tenant = config[:database]
end