Name | Cards | Admin? | |||
---|---|---|---|---|---|
<%= user.name %> | <%= user.email %> | <% user.cards.each do |c| %> <%= link_to c.card_number, card_url(c) %><%= "," unless c == user.cards.last %> <% end %> | <%= if user.admin? then "Admin" end %> | <%= link_to 'Edit', edit_user_path(user) if can? :update, user %> | <%= link_to 'Destroy', user, :confirm => 'Are you sure? WARNING: THIS DOES NOT REMOVE THE USER FROM THE DOOR SYSTEM! DISABLE THEM FIRST.', :method => :delete if can? :destroy, user %> |