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:
parent
177cae5483
commit
08a2249e90
1 changed files with 3 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue