1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Report to logger when a cookie is set

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@23 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2004-11-26 02:16:05 +00:00
parent 177cae5483
commit 08a2249e90

View file

@ -52,11 +52,9 @@ module ActionController #:nodoc:
private
def set_cookie(name, options) #:doc:
if options.is_a?(Array)
@controller.response.headers["cookie"] << CGI::Cookie.new(*options)
else
@controller.response.headers["cookie"] << CGI::Cookie.new(options)
end
cookie = options.is_a?(Array) ? CGI::Cookie.new(*options) : CGI::Cookie.new(options)
@controller.logger.info "Cookie set: #{cookie}" unless @controller.logger.nil?
@controller.response.headers["cookie"] << cookie
end
end
end