From 9f1fdcc27d689fc5feb07a6f197856a710383319 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Fri, 25 Jan 2008 04:13:50 +0000 Subject: Handle corner case with image_tag when passed 'messed up' image names. Closes #9018 [duncanbeevers, mpalmer] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8717 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/asset_tag_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index 30f136103d..12fbbb0dd6 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -398,7 +398,7 @@ module ActionView options.symbolize_keys! options[:src] = path_to_image(source) - options[:alt] ||= File.basename(options[:src], '.*').split('.').first.capitalize + options[:alt] ||= File.basename(options[:src], '.*').split('.').first.to_s.capitalize if size = options.delete(:size) options[:width], options[:height] = size.split("x") if size =~ %r{^\d+x\d+$} -- cgit v1.2.3