提交 58d64ddc 编写于 作者: J Joseph Zidell

Fixed typo in documentation

上级 838be526
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册