1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

using symbol instead of string in establish_connection

This commit is contained in:
Kuldeep Aggarwal 2013-12-25 15:24:25 +05:30
parent f57e5f224b
commit b9d79b1f5f
2 changed files with 2 additions and 2 deletions

View file

@ -92,7 +92,7 @@ module ActiveRecord
)
end
ensure
ActiveRecord::Base.establish_connection 'arunit'
ActiveRecord::Base.establish_connection :arunit
end
end
end

View file

@ -153,7 +153,7 @@ module ApplicationTests
`rails generate model book title:string;
bundle exec rake db:migrate db:structure:dump db:test:load_structure`
ActiveRecord::Base.configurations = Rails.application.config.database_configuration
ActiveRecord::Base.establish_connection 'test'
ActiveRecord::Base.establish_connection :test
require "#{app_path}/app/models/book"
#if structure is not loaded correctly, exception would be raised
assert Book.count, 0