Force the port parameter to be an integer, since some db drivers expect this.

git-svn-id: file:///home/svn/framework3/trunk@5054 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2007-07-17 18:42:26 +00:00
parent b21fb10f75
commit 84370e82aa
1 changed files with 7 additions and 1 deletions

View File

@ -46,6 +46,12 @@ class DBManager
return false if not @usable
nopts = opts.dup
if (nopts['port'])
nopts['port'] = nopts['port'].to_i
end
begin
ActiveRecord::Base.threaded_connections = false
ActiveRecord::Base.establish_connection(opts)