Sha256: bdb2c5609d1c4a82ed4a503639152a668a3113f7ac87a083e6d25cd8b448c591

Contents?: true

Size: 352 Bytes

Versions: 18

Compression:

Stored size: 352 Bytes

Contents

module ARTest
  def self.connection_name
    ENV['ARCONN'] || config['default_connection']
  end

  def self.connection_config
    config['connections'][connection_name]
  end

  def self.connect
    puts "Using #{connection_name}"
    ActiveRecord::Base.configurations = connection_config
    ActiveRecord::Base.establish_connection :arunit
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
activerecord-precount-0.7.0 test/support/connection.rb
activerecord-precount-0.7.0.beta1 test/support/connection.rb
activerecord-precount-0.6.3 test/support/connection.rb
activerecord-precount-0.6.2 test/support/connection.rb
activerecord-precount-0.6.1 test/support/connection.rb
activerecord-precount-0.6.0 test/support/connection.rb
activerecord-precount-0.5.1 test/support/connection.rb
activerecord-precount-0.5.0 test/support/connection.rb
activerecord-precount-0.4.3 test/support/connection.rb
activerecord-precount-0.4.2 test/support/connection.rb
activerecord-precount-0.4.1 test/support/connection.rb
activerecord-precount-0.4.0 test/support/connection.rb
activerecord-count_loader-0.3.3 test/support/connection.rb
activerecord-count_loader-0.3.2 test/support/connection.rb
activerecord-count_loader-0.3.1 test/support/connection.rb
activerecord-count_loader-0.3.0 test/support/connection.rb
activerecord-count_loader-0.2.2 test/support/connection.rb
activerecord-count_loader-0.2.1 test/support/connection.rb