Class: Apartment::Adapters::Mysql2Adapter

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

Overview

Mysql2 Adapter

Direct Known Subclasses

TrilogyAdapter

Instance Attribute Summary

Attributes inherited from AbstractAdapter

#default_tenant

Instance Method Summary collapse

Methods inherited from AbstractAdapter

#create, #current, #drop, #each, #environmentify, #init, #process_excluded_models, #reset, #seed_data, #switch, #switch!

Constructor Details

#initialize(config) ⇒ Mysql2Adapter

Returns a new instance of Mysql2Adapter.



20
21
22
23
24
# File 'lib/apartment/adapters/mysql2_adapter.rb', line 20

def initialize(config)
  super

  @default_tenant = config[:database]
end