aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2016-07-20 02:32:23 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2016-07-20 02:32:37 -0300
commita8a3a8cc691facad4ba7487a7b66362b498720c9 (patch)
treeedd761712a1f6e01fa6c8801fd670402ef5d1c57 /guides
parentf980dee24eb500e2a8a6e25b2fd13dbe2ce5b62d (diff)
parente5a6f7ee9e951dbe0e4e9ea2c0743b4dfb135c57 (diff)
downloadrails-a8a3a8cc691facad4ba7487a7b66362b498720c9.tar.gz
rails-a8a3a8cc691facad4ba7487a7b66362b498720c9.tar.bz2
rails-a8a3a8cc691facad4ba7487a7b66362b498720c9.zip
Merge pull request #25438 from prathamesh-sonpatki/rm-session-store-initializer
Setup default session store internally, no longer through an initializer
Diffstat (limited to 'guides')
-rw-r--r--guides/source/action_controller_overview.md4
-rw-r--r--guides/source/configuring.md2
2 files changed, 3 insertions, 3 deletions
diff --git a/guides/source/action_controller_overview.md b/guides/source/action_controller_overview.md
index 58362fea58..7b1138c7d4 100644
--- a/guides/source/action_controller_overview.md
+++ b/guides/source/action_controller_overview.md
@@ -362,7 +362,7 @@ If your user sessions don't store critical data or don't need to be around for l
Read more about session storage in the [Security Guide](security.html).
-If you need a different session storage mechanism, you can change it in the `config/initializers/session_store.rb` file:
+If you need a different session storage mechanism, you can change it in an initializer:
```ruby
# Use the database for sessions instead of the cookie-based default,
@@ -371,7 +371,7 @@ If you need a different session storage mechanism, you can change it in the `con
# Rails.application.config.session_store :active_record_store
```
-Rails sets up a session key (the name of the cookie) when signing the session data. These can also be changed in `config/initializers/session_store.rb`:
+Rails sets up a session key (the name of the cookie) when signing the session data. These can also be changed in an initializer:
```ruby
# Be sure to restart your server when you modify this file.
diff --git a/guides/source/configuring.md b/guides/source/configuring.md
index d11edf2bfa..ed5975f31d 100644
--- a/guides/source/configuring.md
+++ b/guides/source/configuring.md
@@ -142,7 +142,7 @@ defaults to `:debug` for all environments. The available log levels are: `:debug
* `config.public_file_server.enabled` configures Rails to serve static files from the public directory. This option defaults to `true`, but in the production environment it is set to `false` because the server software (e.g. NGINX or Apache) used to run the application should serve static files instead. If you are running or testing your app in production mode using WEBrick (it is not recommended to use WEBrick in production) set the option to `true.` Otherwise, you won't be able to use page caching and request for files that exist under the public directory.
-* `config.session_store` is usually set up in `config/initializers/session_store.rb` and specifies what class to use to store the session. Possible values are `:cookie_store` which is the default, `:mem_cache_store`, and `:disabled`. The last one tells Rails not to deal with sessions. Custom session stores can also be specified:
+* `config.session_store` specifies what class to use to store the session. Possible values are `:cookie_store` which is the default, `:mem_cache_store`, and `:disabled`. The last one tells Rails not to deal with sessions. Defaults to a cookie store with application name as the session key. Custom session stores can also be specified:
```ruby
config.session_store :my_custom_store