From 8712652dd9728a1df9c9f095da03318d804ebac2 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 10 Dec 2004 00:02:14 +0000 Subject: Set border on link_to_image to 0 by default git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@106 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/url_helper.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index b36d5a4c0b..f0eed442cf 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -32,6 +32,7 @@ module ActionView # # ::alt: If no alt text is given, the file name part of the +src+ is used (capitalized and without the extension) # ::size: Supplied as "XxY", so "30x45" becomes width="30" and height="45" + # ::border: Is set to 0 by default # ::align: Sets the alignment, no special features # # The +src+ can be supplied as a... @@ -53,6 +54,13 @@ module ActionView image_options["width"], image_options["height"] = html_options["size"].split("x") html_options.delete "size" end + + if html_options["border"] + image_options["border"] = html_options["border"] + html_options.delete "border" + else + image_options["border"] = "0" + end if html_options["align"] image_options["align"] = html_options["align"] -- cgit v1.2.3