Sha256: 87c8e5edd1f1701cbc0962538c1ed6361ababa69b18689474be04897d5566a22

Contents?: true

Size: 316 Bytes

Versions: 1

Compression:

Stored size: 316 Bytes

Contents

module DatabaseSlave
  module Base
    extend ActiveSupport::Concern

    included do
      cattr_accessor :slave_connections
      self.slave_connections = []

      class << self
        delegate :using_slave, :using, to: :scoped
      end
    end
  end
end

ActiveRecord::Base.send(:include, DatabaseSlave::Base)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
database_slave-0.1.1 lib/database_slave/base.rb