Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 1180

Show
Ignore:
Timestamp:
04/17/05 07:18:39 (3 years ago)
Author:
david
Message:

Added that deleting a cookie should not just set it to an empty string but also instantly expire it #1118 [todd@robotcoop.com]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r1176 r1180  
    11*SVN* 
     2 
     3* Added that deleting a cookie should not just set it to an empty string but also instantly expire it #1118 [todd@robotcoop.com] 
    24 
    35* Added AssetTagHelper#image_path, AssetTagHelper#javascript_path, and AssetTagHelper#stylesheet_path #1110 [Larry Halff] 
  • trunk/actionpack/lib/action_controller/cookies.rb

    r525 r1180  
    5555    end 
    5656     
    57     # Removes the cookie on the client machine by setting the value to an empty string. 
     57    # Removes the cookie on the client machine by setting the value to an empty string 
     58    # and setting its expiration date into the past 
    5859    def delete(name) 
    59       set_cookie("name" => name.to_s, "value" => ""
     60      set_cookie("name" => name.to_s, "value" => "", "expires" => Time.at(0)
    6061    end 
    6162