diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2019-01-17 17:12:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-17 17:12:57 -0500 |
commit | e65a3a0ce585b1fbcd35872616717595d6950fca (patch) | |
tree | f1373015e625acc65fd0997cbf61a2a63e1b6720 /actionview/lib | |
parent | cc0dd1d371868fe34fba6b58d22a8ba0714d8ae7 (diff) | |
parent | 4d51efe24e461a2a3ed562787308484cd48370c7 (diff) | |
download | rails-e65a3a0ce585b1fbcd35872616717595d6950fca.tar.gz rails-e65a3a0ce585b1fbcd35872616717595d6950fca.tar.bz2 rails-e65a3a0ce585b1fbcd35872616717595d6950fca.zip |
Merge pull request #34954 from rails/rm-remove-5.2-deprecations
Remove all code deprecated in Rails 5.2
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/helpers/asset_tag_helper.rb | 23 |
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 |