diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-01-25 04:13:50 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-01-25 04:13:50 +0000 |
commit | 9f1fdcc27d689fc5feb07a6f197856a710383319 (patch) | |
tree | 3315a8a70589bfa4b1a9f0c19f6b93f909a5b089 /actionpack/lib | |
parent | 2168178bdbb14f1b8a97f22a3eb78dd533c9cb34 (diff) | |
download | rails-9f1fdcc27d689fc5feb07a6f197856a710383319.tar.gz rails-9f1fdcc27d689fc5feb07a6f197856a710383319.tar.bz2 rails-9f1fdcc27d689fc5feb07a6f197856a710383319.zip |
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
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/asset_tag_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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+$} |