check database connection #40

This commit is contained in:
Alexander Meindl 2019-03-13 08:13:24 +01:00
parent 57fac45dd7
commit 495024021e

View File

@ -38,7 +38,7 @@ Redmine::Plugin.register :additionals do
RedCloth3::ALLOWED_TAGS << 'div'
end
if ActiveRecord::Base.connection.table_exists?(:settings)
if ActiveRecord::Base.connection.active? && ActiveRecord::Base.connection.table_exists?(:settings)
Rails.configuration.to_prepare do
Additionals.setup
end