Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8717

Show
Ignore:
Timestamp:
01/25/08 04:13:50 (8 months ago)
Author:
nzkoz
Message:

Handle corner case with image_tag when passed 'messed up' image names. Closes #9018 [duncanbeevers, mpalmer]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r8685 r8717  
    11*SVN* 
     2 
     3* Handle corner case with image_tag when passed 'messed up' image names. #9018 [duncanbeevers, mpalmer] 
    24 
    35* Add label_tag helper for generating elements. #10802 [DefV] 
  • trunk/actionpack/lib/action_view/helpers/asset_tag_helper.rb

    r8641 r8717  
    399399 
    400400        options[:src] = path_to_image(source) 
    401         options[:alt] ||= File.basename(options[:src], '.*').split('.').first.capitalize 
     401        options[:alt] ||= File.basename(options[:src], '.*').split('.').first.to_s.capitalize 
    402402 
    403403        if size = options.delete(:size) 
  • trunk/actionpack/test/template/asset_tag_helper_test.rb

    r8578 r8717  
    132132  ImageLinkToTag = { 
    133133    %(image_tag("xml.png")) => %(<img alt="Xml" src="/images/xml.png" />), 
     134    %(image_tag("..jpg")) => %(<img alt="" src="/images/..jpg" />), 
    134135    %(image_tag("rss.gif", :alt => "rss syndication")) => %(<img alt="rss syndication" src="/images/rss.gif" />), 
    135136    %(image_tag("gold.png", :size => "45x70")) => %(<img alt="Gold" height="70" src="/images/gold.png" width="45" />),