]> git.openstreetmap.org Git - rails.git/blobdiff - config/initializers/session_store.rb
When no cache store is set use cookie storage for sessions
[rails.git] / config / initializers / session_store.rb
index 0f9e899704b0223960085e20457233394edd4849..8a0fd8f03a98eb67b8e91f91bb72a6a1898dc796 100644 (file)
@@ -2,6 +2,8 @@
 
 if defined?(MEMCACHE_SERVERS)
   Rails.application.config.session_store :mem_cache_store, :memcache_server => MEMCACHE_SERVERS, :namespace => "rails:session", :key => "_osm_session"
-else
+elsif Rails.application.config.cache_store != :null_store
   Rails.application.config.session_store :cache_store, :key => "_osm_session"
+else
+  Rails.application.config.session_store :cookie_store, :key => "_osm_session"
 end