%h3 Users
%table.table
  %tr
    %th Name
    %th Points
    %th Joined
  - @users.each do |user|
    %tr
      %td
        - if current_user.admin?
          = link_to become_user_path(user) do
            %span.btn.btn-default
              Become
        = link_to user.name, user_path(user)
      %td
        = user.points
        points
      %td
        = user.created_at.strftime('%d.%m.%Y')

%h3 Users
%table.table
  %tr
    %th Name
    %th Points
    %th Joined
  - @users.each do |user|
    %tr
      %td
        - if current_user.try(:admin?)
          = link_to become_user_path(user) do
            %span.btn.btn-default
              Become
        = link_to user.name, user_path(user)
      %td
        = user.points
        points
      %td
        = user.created_at.strftime('%d.%m.%Y')

Fix nil user error in users list
Fix nil user error in users list
