<% collection.each do |resource| %> <%= resource.name %> <%= resource.item_type %> <%= image_tag resource.image.icon32 %> <%= resource.rarity %> <%= resource.cost %> <%= resource.user.name %> <%= resource.description %> <% if current_user and current_user.admin? %> <%= link_to 'Show', resource %> <%= link_to 'Edit', edit_gamification_item_path(resource) %> <%= link_to 'Destroy', resource, method: :delete, data: { confirm: 'Are you sure?' } %> <% end %> <% end %>