Skip to content

Commit

Permalink
Nil check on category tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtOfCode- committed Apr 27, 2020
1 parent e6422d7 commit 80a968b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@
<% @hot_questions.each do |hq| %>
<div class="widget--body">
<%= link_to question_path(hq) do %>
<span class="badge is-tag is-master-tag"><%= hq.category.name %></span>
<% unless hq.category.nil? %>
<span class="badge is-tag is-master-tag"><%= hq.category.name %></span>
<% end %>
<%= hq.title %>
<% end %>
</div>
Expand Down

0 comments on commit 80a968b

Please sign in to comment.