<% @collections.in_groups_of(4).compact.each do |group| %> <% unless group.compact.empty? %> <% end %> <% end %> <%= content_for :action_links do %> <% if current_user and current_user.has_role?("admin") %> <%= link_to "New collection", new_collection_path %> <% end %> <% end %>