diff options
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-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 |