rss: only hide comments link when no url

stories with a url but also a description were previously not
getting comments link shown
This commit is contained in:
joshua stein 2012-11-21 22:15:00 -06:00
parent 3e689b1c35
commit 088084965c

View file

@ -14,13 +14,14 @@
<author><%= story.user.username %></author>
<pubDate><%= story.created_at.rfc2822 %></pubDate>
<comments><%= story.comments_url %></comments>
<% if story.markeddown_description.present? %>
<description><%= raw coder.encode(story.markeddown_description,
:decimal) %></description>
<% else %>
<description><%= cdata_section(link_to("Comments",
story.comments_url)) %></description>
<% end %>
<description>
<%= raw coder.encode(story.markeddown_description, :decimal) %>
<% if story.url.present? %>
<p>
<%= raw link_to("Comments", story.comments_url) %>
</p>
<% end %>
</description>
<% story.taggings.each do |tagging| %>
<category><%= tagging.tag.tag %></category>
<% end %>