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

Changeset 343

Show
Ignore:
Timestamp:
01/06/05 23:25:19 (4 years ago)
Author:
david
Message:

Simplified the set_cookie method and made it indifferent to symbol or string as name

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/cookies.rb

    r194 r343  
    5252      end 
    5353       
    54       set_cookie(name, options) 
     54      set_cookie(options) 
    5555    end 
    5656     
    5757    # Removes the cookie on the client machine by setting the value to an empty string. 
    5858    def delete(name) 
    59       set_cookie(name, "name" => name, "value" => "") 
     59      set_cookie("name" => name.to_s, "value" => "") 
    6060    end 
    6161 
    6262    private 
    63       def set_cookie(name, options) #:doc: 
     63      def set_cookie(options) #:doc: 
    6464        options["path"] = "/" unless options["path"] 
    6565        cookie = CGI::Cookie.new(options)