aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorMarc-Andre Lafortune <github@marc-andre.ca>2010-05-15 09:42:02 +0200
committerJosé Valim <jose.valim@gmail.com>2010-05-15 09:43:15 +0200
commit9869ee77cdbf8f0e9c7eb6e33738d0aa8f5dc70a (patch)
tree6cd35f18999bfafa552fe017f9ff0ea14d70cff5 /actionpack/lib/action_view/helpers
parent7ffe76046ad142377bf6b286f4477b09513d1e37 (diff)
downloadrails-9869ee77cdbf8f0e9c7eb6e33738d0aa8f5dc70a.tar.gz
rails-9869ee77cdbf8f0e9c7eb6e33738d0aa8f5dc70a.tar.bz2
rails-9869ee77cdbf8f0e9c7eb6e33738d0aa8f5dc70a.zip
Accept :alt => nil on image_tag [#4558 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helper.rb2
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 8731ed0ef3..e1fbc118d5 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -620,7 +620,7 @@ module ActionView
options.symbolize_keys!
src = options[:src] = path_to_image(source)
- options[:alt] ||= File.basename(src, '.*').capitalize
+ options[:alt] = options.fetch(:alt){ File.basename(src, '.*').capitalize }
if size = options.delete(:size)
options[:width], options[:height] = size.split("x") if size =~ %r{^\d+x\d+$}