mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Make AssetTagHelper#preload_link_tag to use path_to_asset method instead of asset_path.
To avoid conflicts with an asset_path named route. Closes https://github.com/rails/rails/issues/42545
This commit is contained in:
parent
97b494fefb
commit
c69f6b1bc7
1 changed files with 1 additions and 1 deletions
|
@ -317,7 +317,7 @@ module ActionView
|
|||
# # => <link rel="preload" href="/media/audio.ogg" as="audio" type="audio/ogg" />
|
||||
#
|
||||
def preload_link_tag(source, options = {})
|
||||
href = asset_path(source, skip_pipeline: options.delete(:skip_pipeline))
|
||||
href = path_to_asset(source, skip_pipeline: options.delete(:skip_pipeline))
|
||||
extname = File.extname(source).downcase.delete(".")
|
||||
mime_type = options.delete(:type) || Template::Types[extname]&.to_s
|
||||
as_type = options.delete(:as) || resolve_link_as(extname, mime_type)
|
||||
|
|
Loading…
Reference in a new issue