ActionView::Helpers::AssetTagHelper

auto_discovery_link_tag

API docs (Rails 8.1.4.1) ↗
def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {})

Description

Creates a <link> for an RSS or Atom feed.

Arguments

Changing a value updates the ERB and HTML.

:rss, :atom and :json set the type attribute to the matching MIME type. Any other value raises ArgumentError unless type is also given in tag_options. The value, uppercased, is used as the title.
= {}
"/feed"
Used as the href attribute. A string is used as is; a hash is converted to a full URL with url_for. Defaults to {}, which gives the URL of the current request (on this site, /api/render on this page's host).
tag_options= {}
"My feed"
Sets the title attribute instead of the one built from the type argument.
"application/xml"
Sets the type attribute instead of the one built from the type argument.
"feed"
Sets the rel attribute instead of the default alternate.
"feed-link"
Ignored. Only rel, type and title in tag_options are used.
Any other tag_options do not become HTML attributes.

ERB

Changes from the previous output: Added Removed Changed


          

HTML