Changeset 110
- Timestamp:
- 12/10/04 17:16:11 (4 years ago)
- Files:
-
- trunk/actionpack/lib/action_controller/cookies.rb (modified) (2 diffs)
- trunk/actionpack/test/template/url_helper_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_controller/cookies.rb
r93 r110 45 45 options["name"] = name.to_s 46 46 else 47 options = [ name, options ]47 options = { "name" => name, "value" => options } 48 48 end 49 49 … … 58 58 private 59 59 def set_cookie(name, options) #:doc: 60 cookie = options.is_a?(Array) ? CGI::Cookie.new(*options) : CGI::Cookie.new(options) 60 options["path"] = "/" unless options["path"] 61 cookie = CGI::Cookie.new(options) 61 62 @controller.logger.info "Cookie set: #{cookie}" unless @controller.logger.nil? 62 63 @controller.response.headers["cookie"] << cookie trunk/actionpack/test/template/url_helper_test.rb
r105 r110 30 30 def test_link_to_image 31 31 assert_equal( 32 "<a href=\"http://www.world.com\"><img alt=\"Rss\" height=\"45\" src=\"/images/rss.png\" width=\"30\" /></a>",32 "<a href=\"http://www.world.com\"><img alt=\"Rss\" border=\"0\" height=\"45\" src=\"/images/rss.png\" width=\"30\" /></a>", 33 33 link_to_image("rss", "http://www.world.com", "size" => "30x45") 34 34 ) 35 35 36 36 assert_equal( 37 "<a class=\"admin\" href=\"http://www.world.com\"><img alt=\"Feed\" height=\"45\" src=\"/images/rss.gif\" width=\"30\" /></a>",37 "<a class=\"admin\" href=\"http://www.world.com\"><img alt=\"Feed\" border=\"0\" height=\"45\" src=\"/images/rss.gif\" width=\"30\" /></a>", 38 38 link_to_image("rss.gif", "http://www.world.com", "size" => "30x45", "alt" => "Feed", "class" => "admin") 39 39 )