diff options
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/cookies.rb | 8 |
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 |