Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v2.2.1) is shown here.
set_cookie(options)
private
Builds a CGI::Cookie object and adds the
cookie to the response headers.
The path of the cookie defaults to "/" if there’s none in
options, and everything is passed to the CGI::Cookie constructor.
# File actionpack/lib/action_controller/cookies.rb, line 99
def set_cookie(options) #:doc:
options["path"] = "/" unless options["path"]
cookie = CGI::Cookie.new(options)
@controller.logger.info "Cookie set: #{cookie}" unless @controller.logger.nil?
@controller.response.headers["cookie"] << cookie
end