aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2019-01-14 15:25:52 -0500
committerRafael Mendonça França <rafaelmfranca@gmail.com>2019-01-17 16:08:31 -0500
commit60c8a03c8d1e45e48fcb1055ba4c49ed3d5ff78f (patch)
tree671c34049bdb773a23cbba4f625001daeb11332d /actionview/lib/action_view/helpers
parente70d3df7c9b05c129b0fdcca57f66eca316c5cfc (diff)
downloadrails-60c8a03c8d1e45e48fcb1055ba4c49ed3d5ff78f.tar.gz
rails-60c8a03c8d1e45e48fcb1055ba4c49ed3d5ff78f.tar.bz2
rails-60c8a03c8d1e45e48fcb1055ba4c49ed3d5ff78f.zip
Remove deprecated image_alt helper
Diffstat (limited to 'actionview/lib/action_view/helpers')
-rw-r--r--actionview/lib/action_view/helpers/asset_tag_helper.rb23
1 files changed, 0 insertions, 23 deletions
diff --git a/actionview/lib/action_view/helpers/asset_tag_helper.rb b/actionview/lib/action_view/helpers/asset_tag_helper.rb
index 3d7c8dae75..c186cb8422 100644
--- a/actionview/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionview/lib/action_view/helpers/asset_tag_helper.rb
@@ -355,29 +355,6 @@ module ActionView
tag("img", options)
end
- # Returns a string suitable for an HTML image tag alt attribute.
- # The +src+ argument is meant to be an image file path.
- # The method removes the basename of the file path and the digest,
- # if any. It also removes hyphens and underscores from file names and
- # replaces them with spaces, returning a space-separated, titleized
- # string.
- #
- # ==== Examples
- #
- # image_alt('rails.png')
- # # => Rails
- #
- # image_alt('hyphenated-file-name.png')
- # # => Hyphenated file name
- #
- # image_alt('underscored_file_name.png')
- # # => Underscored file name
- def image_alt(src)
- ActiveSupport::Deprecation.warn("image_alt is deprecated and will be removed from Rails 6.0. You must explicitly set alt text on images.")
-
- File.basename(src, ".*").sub(/-[[:xdigit:]]{32,64}\z/, "").tr("-_", " ").capitalize
- end
-
# Returns an HTML video tag for the +sources+. If +sources+ is a string,
# a single video tag will be returned. If +sources+ is an array, a video
# tag with nested source tags for each source will be returned. The