Permalink
Browse files

Merge pull request #12437 from websiteswithclass/master

Fixed typo in documentation
  • Loading branch information...
2 parents 86780e2 + bf49506 commit 874ca68f3d3a8e1b538edc95e332654a79057c21 @rafaelfranca rafaelfranca committed Oct 4, 2013
Showing with 6 additions and 6 deletions.
  1. +6 −6 actionview/lib/action_view/helpers/asset_tag_helper.rb
View
12 actionview/lib/action_view/helpers/asset_tag_helper.rb
@@ -224,14 +224,14 @@ def image_tag(source, options={})
#
# ==== Examples
#
- # image_tag('rails.png')
- # # => <img alt="Rails" src="/assets/rails.png" />
+ # image_alt('rails.png')
+ # # => Rails
#
- # image_tag('hyphenated-file-name.png')
- # # => <img alt="Hyphenated file name" src="/assets/hyphenated-file-name.png" />
+ # image_alt('hyphenated-file-name.png')
+ # # => Hyphenated file name
#
- # image_tag('underscored_file_name.png')
- # # => <img alt="Underscored file name" src="/assets/underscored_file_name.png" />
+ # image_alt('underscored_file_name.png')
+ # # => Underscored file name
def image_alt(src)
File.basename(src, '.*').sub(/-[[:xdigit:]]{32}\z/, '').tr('-_', ' ').capitalize
end

0 comments on commit 874ca68

Please sign in to comment.