Lab Resources <%= link_to 'Add Resource', new_resource_path, :class => "btn btn-success" if can? :create, Resource %> <%= link_to 'Categories', resource_categories_path, :class => "btn btn-primary" if can? :read, ResourceCategory %> Expand/Collapse All

Featured item:

<%= render @featured_resource unless @featured_resource.blank? %>
<% unless @resources.blank? %>
<% @resources.sort_by{|r| [r.resource_category_name,r.name] }.group_by(&:resource_category).each do |resource_category,resources| %>

<%= resource_category.name %>

<% resources.each do |resource| %>
<%= render resource %>
<% end %>
<% end %>
<% end %>