module
ActionController::Cookies
v3.0.0 -
Show latest stable
No documentation available for this module.
Included modules
- RackDelegation
Files
- actionpack/lib/action_controller/metal/cookies.rb
2Notes
Writing and reading a cookie in the same request.
Note that when setting the value of a cookie, the new value won't be accessible until the next page request. In this way, the cookies hash cannot be used in the same manner as the session hash.
For example:
given that cookies[:temporary_data] was set to 'foo' in the previous request
cookies[:temporary_data] = 'bar' p cookies[:temporary_data] # => 'foo'
Writing and reading a cookie in the same request.
As of 0349278f3da9f7f532330cf295eed35ede3bae66 cookie updates will persist in the current request.