1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Pass the skip_pipeline option in image_submit_tag

Fixes #32248.
This commit is contained in:
Andrew White 2018-03-14 11:18:06 +00:00
parent a489cc81b6
commit ae7a57209d
2 changed files with 4 additions and 2 deletions

View file

@ -551,7 +551,8 @@ module ActionView
# # => <input src="/assets/save.png" data-confirm="Are you sure?" type="image" />
def image_submit_tag(source, options = {})
options = options.stringify_keys
tag :input, { "type" => "image", "src" => path_to_image(source) }.update(options)
src = path_to_image(source, skip_pipeline: options.delete("skip_pipeline"))
tag :input, { "type" => "image", "src" => src }.update(options)
end
# Creates a field set for grouping HTML form elements.

View file

@ -77,7 +77,8 @@ module ApplicationTests
stylesheet_link_tag: %r{<link rel="stylesheet" media="screen" href="/stylesheets/#{contents}.css" />},
javascript_include_tag: %r{<script src="/javascripts/#{contents}.js">},
audio_tag: %r{<audio src="/audios/#{contents}"></audio>},
video_tag: %r{<video src="/videos/#{contents}"></video>}
video_tag: %r{<video src="/videos/#{contents}"></video>},
image_submit_tag: %r{<input type="image" src="/images/#{contents}" />}
}
cases.each do |(view_method, tag_match)|