From 2fbcae1912b1b6102790ef28f06c2d2a51e72828 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 3 Jun 2006 21:48:30 +0000 Subject: Added disconnect! to Firebird adapter (closes #5210) [kennethkunz@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4421 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/active_record/connection_adapters/firebird_adapter.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/connection_adapters/firebird_adapter.rb b/activerecord/lib/active_record/connection_adapters/firebird_adapter.rb index 9bf047f0b8..b7b0736f78 100644 --- a/activerecord/lib/active_record/connection_adapters/firebird_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/firebird_adapter.rb @@ -294,8 +294,12 @@ module ActiveRecord not @connection.closed? end + def disconnect! + @connection.close rescue nil + end + def reconnect! - @connection.close + disconnect! @connection = @connection.database.connect(*@connection_params) end -- cgit v1.2.3