module Switchman::ActiveRecord::Migration

Public Instance Methods

connection() click to toggle source
Calls superclass method
# File lib/switchman/active_record/migration.rb, line 15
def connection
  conn = super
  ::ActiveRecord::Base.connection_pool.switch_database(conn) if conn.shard != ::ActiveRecord::Base.connection_pool.shard
  conn
end