X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/66c95aa3f909f9887593fd16174d1d8a966cad2e..c9fa49c99485b0ba1242c6d13e12df9ab1532987:/config/initializers/sql_session_store.rb diff --git a/config/initializers/sql_session_store.rb b/config/initializers/sql_session_store.rb index 986037afe..8dc40384e 100644 --- a/config/initializers/sql_session_store.rb +++ b/config/initializers/sql_session_store.rb @@ -1,7 +1,8 @@ # Work out which session store adapter to use -environment = Rails.configuration.environment -adapter = Rails.configuration.database_configuration[environment]["adapter"] +adapter = Rails.configuration.database_configuration[Rails.env]["adapter"] session_class = adapter + "_session" # Configure SqlSessionStore -SqlSessionStore.session_class = session_class.camelize.constantize +unless STATUS == :database_offline + SqlSessionStore.session_class = session_class.camelize.constantize +end