Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add :json type to auto_discovery_link_tag() #29142

Closed
veganstraightedge opened this issue May 19, 2017 · 5 comments
Closed

Add :json type to auto_discovery_link_tag() #29142

veganstraightedge opened this issue May 19, 2017 · 5 comments

Comments

@veganstraightedge
Copy link

This is a feature request to support the new JSON Feed format in auto_discovery_link_tag.

See: https://jsonfeed.org/version/1#discovery

Steps to reproduce

Add an auto_discovery_link_tag using the type of :json

<%= auto_discovery_link_tag(:json, "https://example.com/feed.json", title: "JSON Feed" ) %>

Expected behavior

<link rel="alternate" title="JSON Feed" type="application/json" href="https://example.com/feed.json" />

Actual behavior

You should pass :type tag_option key explicitly, because you have passed json type other than :rss or :atom.

This meant I had to re-write like this:

<%= auto_discovery_link_tag(nil, "https://example.com/feed.json", { title: "JSON Feed", type: "application/json" }) %>

Bummer.

System configuration

Rails version: 5.1.0

Ruby version: 2.4.0

@bogdanvlviv
Copy link
Contributor

@pixeltrix this issue can be closed

@veganstraightedge
Copy link
Author

@bogdanvlviv @pixeltrix Can you give a reason why it was closed?

@pixeltrix
Copy link
Contributor

@veganstraightedge because I merged #29158 which adds support for :json to auto_discovery_link_tag 😄

@veganstraightedge
Copy link
Author

Oh thanks! I missed the merger PR. 👍🏻👍🏻👍🏻

@veganstraightedge
Copy link
Author

s/merger/merged/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants