public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
Removed the default border on link_image_to (it broke xhtml strict) -- can 
be specified with :border => 0 #517 [?/caleb]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@836 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
dhh (author)
Sun Mar 06 04:02:17 -0800 2005
commit  eb5ca2ea5ff55e2f6a49580afab5e0ddd0b2bf11
tree    4339a9e113f965cb42a3d44ee14a7f29b7ec4163
parent  fe6d929bf03650382db06ed63a199f9baa79102d
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *SVN*
0
 
0
+* Removed the default border on link_image_to (it broke xhtml strict) -- can be specified with :border => 0 #517 [?/caleb]
0
+
0
 * Fixed that form helpers would treat string and symbol keys differently in html_options (and possibly create duplicate entries) #112 [bitsweat]
0
 
0
 * Fixed that broken pipe errors (clients disconnecting in mid-request) could bring down a fcgi process
...
39
40
41
42
 
43
44
45
...
70
71
72
73
74
75
76
77
...
39
40
41
 
42
43
44
45
...
70
71
72
 
 
73
74
75
0
@@ -39,7 +39,7 @@
0
       #
0
       # * <tt>:alt</tt> - If no alt text is given, the file name part of the +src+ is used (capitalized and without the extension)
0
       # * <tt>:size</tt> - Supplied as "XxY", so "30x45" becomes width="30" and height="45"
0
- # * <tt>:border</tt> - Is set to 0 by default
0
+ # * <tt>:border</tt> - Draws a border around the link
0
       # * <tt>:align</tt> - Sets the alignment, no special features
0
       #
0
       # The +src+ can be supplied as a...
0
@@ -70,8 +70,6 @@
0
         if html_options["border"]
0
           image_options["border"] = html_options["border"]
0
           html_options.delete "border"
0
- else
0
- image_options["border"] = "0"
0
         end
0
 
0
         if html_options["align"]
...
29
30
31
32
 
33
34
35
 
36
37
38
39
40
 
 
41
42
43
44
45
46
 
 
 
 
47
48
49
...
29
30
31
 
32
33
34
 
35
36
37
38
 
 
39
40
41
42
 
 
 
 
43
44
45
46
47
48
49
0
@@ -29,21 +29,21 @@
0
     )
0
   end
0
 
0
- def test_link_to_image
0
+ def test_link_image_to
0
     assert_equal(
0
       "<a href=\"http://www.world.com\"><img alt=\"Rss\" border=\"0\" height=\"45\" src=\"/images/rss.png\" width=\"30\" /></a>",
0
- link_to_image("rss", "http://www.world.com", "size" => "30x45")
0
+ link_image_to("rss", "http://www.world.com", "size" => "30x45", "border" => "0")
0
     )
0
 
0
     assert_equal(
0
- "<a class=\"admin\" href=\"http://www.world.com\"><img alt=\"Feed\" border=\"0\" height=\"45\" src=\"/images/rss.gif\" width=\"30\" /></a>",
0
- link_to_image("rss.gif", "http://www.world.com", "size" => "30x45", "alt" => "Feed", "class" => "admin")
0
+ "<a class=\"admin\" href=\"http://www.world.com\"><img alt=\"Feed\" height=\"45\" src=\"/images/rss.gif\" width=\"30\" /></a>",
0
+ link_image_to("rss.gif", "http://www.world.com", "size" => "30x45", "alt" => "Feed", "class" => "admin")
0
     )
0
 
0
- assert_equal link_to_image("rss", "http://www.world.com", "size" => "30x45"),
0
- link_to_image("rss", "http://www.world.com", :size => "30x45")
0
- assert_equal link_to_image("rss.gif", "http://www.world.com", "size" => "30x45", "alt" => "Feed", "class" => "admin"),
0
- link_to_image("rss.gif", "http://www.world.com", :size => "30x45", :alt => "Feed", :class => "admin")
0
+ assert_equal link_image_to("rss", "http://www.world.com", "size" => "30x45"),
0
+ link_image_to("rss", "http://www.world.com", :size => "30x45")
0
+ assert_equal link_image_to("rss.gif", "http://www.world.com", "size" => "30x45", "alt" => "Feed", "class" => "admin"),
0
+ link_image_to("rss.gif", "http://www.world.com", :size => "30x45", :alt => "Feed", :class => "admin")
0
   end
0
 
0
   def test_link_unless_current

Comments

    No one has commented yet.