X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/66c95aa3f909f9887593fd16174d1d8a966cad2e..a543e731c0433b2aa0f0f1583f7c70182a084fd5:/config/initializers/sql_session_store.rb?ds=sidebyside 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