%# automatic legend for topics without auto or custom fragments %> <% for layer in @topic.layers.accessible_by(current_ability).order('topics_layers.leg_sort DESC') do -%> <% if layer.legend %>
<%= layer.title %>
<%= render :partial => layer.legend, :as => :legend %>