Skip to content

Instantly share code, notes, and snippets.

@brentsowers1
Created March 6, 2014 02:59
Show Gist options
  • Save brentsowers1/9381406 to your computer and use it in GitHub Desktop.
Save brentsowers1/9381406 to your computer and use it in GitHub Desktop.
config/initializers/session_store.rb
# Be sure to restart your server when you modify this file.
# Your secret key for verifying cookie session data integrity.
# If you change this key, all old sessions will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
ActionController::Base.session = {
:key => '_<%= app_name %>_session',
:secret => '<%= app_secret %>'
}
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rake db:sessions:create")
# ActionController::Base.session_store = :active_record_store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment