aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-11-26 02:16:05 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-11-26 02:16:05 +0000
commit08a2249e907eabe087b6a4a32f1892d4e58b7b82 (patch)
tree38b870ae6f70f529ed84ad24d8c00617dc6c346c /actionpack
parent177cae5483736e20bc8b1f878a4f1a52eed26a10 (diff)
downloadrails-08a2249e907eabe087b6a4a32f1892d4e58b7b82.tar.gz
rails-08a2249e907eabe087b6a4a32f1892d4e58b7b82.tar.bz2
rails-08a2249e907eabe087b6a4a32f1892d4e58b7b82.zip
Report to logger when a cookie is set
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@23 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/cookies.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/cookies.rb b/actionpack/lib/action_controller/cookies.rb
index b23bb74f88..e047dcf2b9 100644
--- a/actionpack/lib/action_controller/cookies.rb
+++ b/actionpack/lib/action_controller/cookies.rb
@@ -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