diff options
author | Azul <azul@leap.se> | 2013-02-09 14:36:53 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-02-09 14:36:53 +0100 |
commit | bb58733e065c7ff5036e75e805f1d498d0085e80 (patch) | |
tree | 08f4efb3ac81f2bc76032935fef9afe58d662b04 | |
parent | 1491f0795fd88193a320b90bd7ac351f8b64052e (diff) |
configure couchrest session store in initializer
-rw-r--r-- | app/controllers/home_controller.rb | 1 | ||||
-rw-r--r-- | config/initializers/session_store.rb | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 7db5397..4e1983a 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -1,5 +1,6 @@ class HomeController < ApplicationController def index + debugger if params[:debug] end end diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 4ae1e21..b454120 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,3 +1,10 @@ # Be sure to restart your server when you modify this file. LeapWeb::Application.config.session_store CouchRestSessionStore + +CouchRestSessionStore.configure do |conf| + conf.environment = Rails.env + conf.connection_config_file = File.join(Rails.root, 'config', 'couchdb.yml') + conf.connection[:prefix] = + Rails.application.class.to_s.underscore.gsub(/\/.*/, '') +end |