diff --git a/app/views/themengruppen/faqs.html.erb b/app/views/themengruppen/faqs.html.erb index cd85780..e76d6fc 100644 --- a/app/views/themengruppen/faqs.html.erb +++ b/app/views/themengruppen/faqs.html.erb @@ -2,16 +2,17 @@
<% @themengruppen.each do |tg| %> - <% if can?(:show, tg) %> + <% themen = tg.themen.accessible_by(current_ability, :show).order(:priority).reverse_order.select{|t| !t.fragen.empty?} %> + <% if can?(:show, tg) && !themen.empty? %>

<%= tg.title%>