only show channel tags if present

This commit is contained in:
Lee Lawlor 2014-08-05 18:23:50 -04:00
parent 0e142458f5
commit 9521a998e5

View File

@ -4,12 +4,14 @@
<div>by <%= link_to @channel.user.login, user_profile_path(@channel.user.login) %></div><br> <div>by <%= link_to @channel.user.login, user_profile_path(@channel.user.login) %></div><br>
<% end %> <% end %>
<div><%= @channel.description %></div><br> <div><%= @channel.description %></div><br>
<div> <% if @channel.tags.present? %>
<b>Tags:</b> <div>
<% @channel.tags.each do |tag| %> <b>Tags:</b>
<a href="/channels/public?tag=<%=u tag.name %>"><%= tag.name %></a><% unless tag == @channel.tags.last %>, <% end %> <% @channel.tags.each do |tag| %>
<% end %> <a href="/channels/public?tag=<%=u tag.name %>"><%= tag.name %></a><% unless tag == @channel.tags.last %>, <% end %>
</div><br> <% end %>
</div><br>
<% end %>
</div> </div>
<div id="channellinks"> <div id="channellinks">