couchrest_session_store 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/couchrest_session_store.rb +7 -2
- metadata +1 -1
@@ -27,6 +27,11 @@ class CouchRestSessionStore < ActionDispatch::Session::AbstractStore
|
|
27
27
|
|
28
28
|
def initialize(app, options = {})
|
29
29
|
super
|
30
|
+
self.class.set_options(options)
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.set_options(options)
|
34
|
+
@options = options
|
30
35
|
end
|
31
36
|
|
32
37
|
# just fetch from the config
|
@@ -34,8 +39,8 @@ class CouchRestSessionStore < ActionDispatch::Session::AbstractStore
|
|
34
39
|
@database ||= initialize_database
|
35
40
|
end
|
36
41
|
|
37
|
-
def initialize_database
|
38
|
-
|
42
|
+
def self.initialize_database
|
43
|
+
use_database @options[:database] || "sessions"
|
39
44
|
prepare_database
|
40
45
|
end
|
41
46
|
|