Sha256: 780764f9f0c357e8c88abc91fcb97c074cbd0832323866274754aef23754ba40

Contents?: true

Size: 755 Bytes

Versions: 25

Compression:

Stored size: 755 Bytes

Contents

print "Using native MySQL\n"
require_dependency 'models/course'
require 'logger'

RAILS_DEFAULT_LOGGER = Logger.new('debug.log')
RAILS_DEFAULT_LOGGER.level = Logger::DEBUG
ActiveRecord::Base.logger = RAILS_DEFAULT_LOGGER

# GRANT ALL PRIVILEGES ON activerecord_unittest.* to 'rails'@'localhost';
# GRANT ALL PRIVILEGES ON activerecord_unittest2.* to 'rails'@'localhost';

ActiveRecord::Base.configurations = {
  'arunit' => {
    :adapter  => 'mysql',
    :username => 'rails',
    :encoding => 'utf8',
    :database => 'activerecord_unittest',
  },
  'arunit2' => {
    :adapter  => 'mysql',
    :username => 'rails',
    :database => 'activerecord_unittest2'
  }
}

ActiveRecord::Base.establish_connection 'arunit'
Course.establish_connection 'arunit2'

Version data entries

25 entries across 25 versions & 7 rubygems

Version Path
3mix-castronaut-0.5.0.2 vendor/activerecord/test/connections/native_mysql/connection.rb
masover-castronaut-0.4.4.4 vendor/activerecord/test/connections/native_mysql/connection.rb
masover-castronaut-0.4.4.5 vendor/activerecord/test/connections/native_mysql/connection.rb
masover-castronaut-0.5.0.1 vendor/activerecord/test/connections/native_mysql/connection.rb
relevance-castronaut-0.4.1 vendor/activerecord/test/connections/native_mysql/connection.rb
relevance-castronaut-0.4.2 vendor/activerecord/test/connections/native_mysql/connection.rb
relevance-castronaut-0.4.3 vendor/activerecord/test/connections/native_mysql/connection.rb
relevance-castronaut-0.4.4 vendor/activerecord/test/connections/native_mysql/connection.rb
relevance-castronaut-0.4.5 vendor/activerecord/test/connections/native_mysql/connection.rb
relevance-castronaut-0.4.6 vendor/activerecord/test/connections/native_mysql/connection.rb
relevance-castronaut-0.5.0 vendor/activerecord/test/connections/native_mysql/connection.rb
relevance-castronaut-0.5.1 vendor/activerecord/test/connections/native_mysql/connection.rb
relevance-castronaut-0.5.2 vendor/activerecord/test/connections/native_mysql/connection.rb
relevance-castronaut-0.5.3 vendor/activerecord/test/connections/native_mysql/connection.rb
relevance-castronaut-0.5.4 vendor/activerecord/test/connections/native_mysql/connection.rb
radiant-0.7.2 vendor/rails/activerecord/test/connections/native_mysql/connection.rb
vibes-bj-1.2.2 spec/rails_root/vendor/rails/activerecord/test/connections/native_mysql/connection.rb
vibes-bj-1.2.1 spec/rails_root/vendor/rails/activerecord/test/connections/native_mysql/connection.rb
activerecord-2.1.2 test/connections/native_mysql/connection.rb
activerecord-2.1.0 test/connections/native_mysql/connection.rb