Make sure there is a connection before using ActiveRecord

This commit is contained in:
Jeroen Nijhof 2016-02-08 17:31:24 +01:00
parent 9fdd605fd2
commit 897f18032a
1 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,9 @@
module Backup
class Manager
def pack
# Make sure there is a connection
ActiveRecord::Base.connection.reconnect!
# saving additional informations
s = {}
s[:db_version] = "#{ActiveRecord::Migrator.current_version}"