ruby on rails - How can I override automatically generated links in Atom feeds? -
my atom feed automatically generates link
want removed. how can achieve that? code:
atom_feed |feed| feed.title @client.name @documents.each |document| feed.entry document, published: document.created_at |entry| entry.title document.title entry.content document.message entry.link share_url(@client.client_code, document.id) entry.url share_url(@client.client_code, document.id) entry.author @client.name end end end
generates feed:
<entry> <id>tag:localhost,2005:document/2694</id> <published>2014-04-25t11:36:34+10:00</published> <updated>2014-05-01t09:27:16+10:00</updated> <link rel="alternate" type="text/html" href="http://localhost:3000/documents/2694"/> <title>april</title> <content>whatever.</content> <link>http://localhost:3000/user/2694</link> <url>http://localhost:3000/user/2694</url> <author>user</author> </entry>
here's offender want removed (or @ least changed):
<link rel="alternate" type="text/html" href="http://localhost:3000/documents/2694"/>
any ideas? thanks.
solved. can pass url
argument feed
this:
... feed.entry document, published: document.created_at, url: share_url(document.user.client_code, document.id) |entry| ...
Comments
Post a Comment