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 %>

Featured item:

<%= render @featured_resource %>
<% 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 %>

<%= render resources %>
<% end %>
<% end %>