Sha256: c4ef2f74d834d41cf6b856bc4ce9fea5ef6bc4701342ba932257da6222922092

Contents?: true

Size: 275 Bytes

Versions: 1

Compression:

Stored size: 275 Bytes

Contents

require 'mongoid'
require_relative 'tenancy'

require 'mongoid/tenant/railtie' if defined?(Rails)

module Mongoid
  module Tenant
    extend ActiveSupport::Concern

    included do
      store_in database: -> { Thread.current[:mongodb] }
    end
  end # Tenant
end # Mongoid

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongoid-tenant-0.0.5 lib/mongoid/tenant.rb