Work out which session store class to use automatically.
This commit is contained in:
parent
2e2b556a25
commit
66c95aa3f9
1 changed files with 7 additions and 2 deletions
|
@ -1,2 +1,7 @@
|
|||
# Use the MySQL interface for SqlSessionStore
|
||||
SqlSessionStore.session_class = MysqlSession
|
||||
# Work out which session store adapter to use
|
||||
environment = Rails.configuration.environment
|
||||
adapter = Rails.configuration.database_configuration[environment]["adapter"]
|
||||
session_class = adapter + "_session"
|
||||
|
||||
# Configure SqlSessionStore
|
||||
SqlSessionStore.session_class = session_class.camelize.constantize
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue