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