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) # ::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" # ::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 # ::align: Sets the alignment, no special features
# #
# The +src+ can be supplied as a... # The +src+ can be supplied as a...
@ -54,6 +55,13 @@ module ActionView
html_options.delete "size" html_options.delete "size"
end 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"] if html_options["align"]
image_options["align"] = html_options["align"] image_options["align"] = html_options["align"]
html_options.delete "align" html_options.delete "align"