Permalink
Browse files

Fixed typo in documentation

  • Loading branch information...
Joseph Zidell
Joseph Zidell committed Oct 3, 2013
1 parent 838be52 commit 58d64ddc4645479cff927eb3e72a871d22f3094a
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionview/lib/action_view/helpers/asset_tag_helper.rb
@@ -224,13 +224,13 @@ def image_tag(source, options={})
#
# ==== Examples
#
- # image_tag('rails.png')
+ # image_alt('rails.png')
# # => <img alt="Rails" src="/assets/rails.png" />
#
- # image_tag('hyphenated-file-name.png')
+ # image_alt('hyphenated-file-name.png')
# # => <img alt="Hyphenated file name" src="/assets/hyphenated-file-name.png" />
#
- # image_tag('underscored_file_name.png')
+ # image_alt('underscored_file_name.png')
# # => <img alt="Underscored file name" src="/assets/underscored_file_name.png" />
def image_alt(src)
File.basename(src, '.*').sub(/-[[:xdigit:]]{32}\z/, '').tr('-_', ' ').capitalize

0 comments on commit 58d64dd

Please sign in to comment.