aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-12-10 00:02:14 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-12-10 00:02:14 +0000
commit8712652dd9728a1df9c9f095da03318d804ebac2 (patch)
tree51485f3ffb1e445e026be52e521d95e63ebdd67e /actionpack
parente1917cab3249e7341160bce66f90b5ec52e14733 (diff)
downloadrails-8712652dd9728a1df9c9f095da03318d804ebac2.tar.gz
rails-8712652dd9728a1df9c9f095da03318d804ebac2.tar.bz2
rails-8712652dd9728a1df9c9f095da03318d804ebac2.zip
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
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb8
1 files changed, 8 insertions, 0 deletions
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"]