Displaying 1 result from an estimated 1 matches for "wp_db".
Did you mean:
wp_df
2006 Jun 20
1
Extracting a connection out of ActiveRecord::Base
...Base.connection
ActiveRecord::Base.establish_connection(
:adapter => self.options[:db_adapter],
:host => self.options[:db_host],
:username => self.options[:db_username],
:password => self.options[:db_password],
:database => self.options[:wp_db]
)
self.connection = ActiveRecord::Base.connection
ActiveRecord::Base.connection = typo_conn
puts "connected."
end
the connection stored in self.connection seems to get closed when the
connection to the typo database is restored.
Is there some way to achiev...