Sha256: 9cd2ad1a6ab34a59c06ee186482917e9e500dbc96fe83eef928d91c5c35cfc55

Contents?: true

Size: 667 Bytes

Versions: 1

Compression:

Stored size: 667 Bytes

Contents

require 'rails'
require 'active_record'

require 'active_tenant/version'
require 'active_tenant/engine'
require 'active_tenant/adapters/sqlite_adapter'
require 'active_tenant/adapters/postgres_adapter'
require 'active_tenant/base'
require 'active_tenant/active_record_extensions'
require 'active_tenant/configuration'

module ActiveTenant

  def self.configuration
    @@configuration ||= Configuration.new
  end

  def self.configure
    yield(configuration)
  end

  def self.current
    ActiveTenant::Base.new
  end

end

ActiveRecord::Base.send :extend, ActiveTenant::ActiveRecord::Base
ActiveRecord::Migration.send :extend, ActiveTenant::ActiveRecord::Migration

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_tenant-0.0.3 lib/active_tenant.rb