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
This commit is contained in:
David Heinemeier Hansson 2004-12-10 00:02:14 +00:00
parent e1917cab32
commit 8712652dd9
1 changed files with 8 additions and 0 deletions

View File

@ -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"]