diff options
-rw-r--r-- | actionpack/lib/action_view/helpers/url_helper.rb | 8 |
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"] |