]> git.openstreetmap.org Git - rails.git/blobdiff - config/initializers/sql_session_store.rb
Update to rails 3
[rails.git] / config / initializers / sql_session_store.rb
index 986037afe3d107d047be03a5c192c57e24b345d0..8dc40384e07cef9f86c5c8fc80217cf36bba848b 100644 (file)
@@ -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