]> git.openstreetmap.org Git - rails.git/blobdiff - config/initializers/sql_session_store.rb
Don't allow STARTTLS to be used when sending mail
[rails.git] / config / initializers / sql_session_store.rb
index fd6c11d4447b2f66bfae1fcf8e861369201e9b2c..8dc40384e07cef9f86c5c8fc80217cf36bba848b 100644 (file)
@@ -1,2 +1,8 @@
-# Use the MySQL interface for SqlSessionStore
-SqlSessionStore.session_class = MysqlSession
+# Work out which session store adapter to use
+adapter = Rails.configuration.database_configuration[Rails.env]["adapter"]
+session_class = adapter + "_session"
+
+# Configure SqlSessionStore
+unless STATUS == :database_offline
+  SqlSessionStore.session_class = session_class.camelize.constantize
+end