Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Report to logger when a cookie is set

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@23 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 08a2249e907eabe087b6a4a32f1892d4e58b7b82 1 parent 177cae5
@dhh dhh authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 actionpack/lib/action_controller/cookies.rb
View
8 actionpack/lib/action_controller/cookies.rb
@@ -52,11 +52,9 @@ def []=(name, options)
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
Please sign in to comment.
Something went wrong with that request. Please try again.