The :cookies plugin adds response methods for handling cookies.
Currently, you can set cookies with #.set_cookie and delete cookies with #.delete_cookie:
response.set_cookie('foo', 'bar')
response.delete_cookie('foo')#.delete_cookie(key, value = {})Modify the headers to include a Set-Cookie value that deletes the cookie.
A value hash can be provided to override the default one used to delete the cookie.
Example:
response.delete_cookie('foo')
response.delete_cookie('foo', domain: 'example.org')#.set_cookie(key, value)Set the cookie with the given key in the headers.
response.set_cookie('foo', 'bar')
response.set_cookie('foo', value: 'bar', domain: 'example.org')