diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-06-03 21:48:30 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-06-03 21:48:30 +0000 |
commit | 2fbcae1912b1b6102790ef28f06c2d2a51e72828 (patch) | |
tree | fe77c373f8aea62e67b8106582ea2d3a744bec80 /activerecord/lib/active_record | |
parent | 6a9f47f33f853c6899bb50bf21e49da798bdd12e (diff) | |
download | rails-2fbcae1912b1b6102790ef28f06c2d2a51e72828.tar.gz rails-2fbcae1912b1b6102790ef28f06c2d2a51e72828.tar.bz2 rails-2fbcae1912b1b6102790ef28f06c2d2a51e72828.zip |
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
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/firebird_adapter.rb | 6 |
1 files changed, 5 insertions, 1 deletions
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 |