X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7fc2dbecd572718421d000441ccb305241e7d5ff..639a994c9b851b94d4c65aa96af732eefc8453fb:/config/initializers/sql_session_store.rb diff --git a/config/initializers/sql_session_store.rb b/config/initializers/sql_session_store.rb index fd6c11d44..986037afe 100644 --- a/config/initializers/sql_session_store.rb +++ b/config/initializers/sql_session_store.rb @@ -1,2 +1,7 @@ -# Use the MySQL interface for SqlSessionStore -SqlSessionStore.session_class = MysqlSession +# Work out which session store adapter to use +environment = Rails.configuration.environment +adapter = Rails.configuration.database_configuration[environment]["adapter"] +session_class = adapter + "_session" + +# Configure SqlSessionStore +SqlSessionStore.session_class = session_class.camelize.constantize