aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-10-04 06:40:01 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-10-04 06:40:01 -0700
commit874ca68f3d3a8e1b538edc95e332654a79057c21 (patch)
tree2d1486773e6ac01913d89ba749910cb82d4529d6 /actionview
parent86780e25679a2a5e809d29262b610681fc109aa7 (diff)
parentbf495069cbad76bebbe775fc4c0f8f88ddf29099 (diff)
downloadrails-874ca68f3d3a8e1b538edc95e332654a79057c21.tar.gz
rails-874ca68f3d3a8e1b538edc95e332654a79057c21.tar.bz2
rails-874ca68f3d3a8e1b538edc95e332654a79057c21.zip
Merge pull request #12437 from websiteswithclass/master
Fixed typo in documentation
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/helpers/asset_tag_helper.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/actionview/lib/action_view/helpers/asset_tag_helper.rb b/actionview/lib/action_view/helpers/asset_tag_helper.rb
index a13d0021ea..e2430140c2 100644
--- a/actionview/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionview/lib/action_view/helpers/asset_tag_helper.rb
@@ -224,14 +224,14 @@ module ActionView
#
# ==== 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