fununloaded/One_Eighty_Degrees_Consulting

View on GitHub
app/views/admin/editusers.html.haml

Summary

Maintainability
Test Coverage
%body
  .container_graybox
    %p Edit Users
  =form_tag users_update_or_destroy_path, method: "post" do
    %table#users{:align => "center"}
      %thead
        %tr
          %th.center Name
          %th.center Email
          %th.center Member Type
          %th.center Sign in Count
          %th.center Last Sign in At
          %th.center=check_box_tag "Check All"
      %tbody
        - User.all.each do |user|
          %tr
            %td.name=user.name 
            %td.email=user.email
            %td.member_type=user.member_type
            %td.count=user.sign_in_count
            %td.last=user.last_sign_in_at
            
            %td.select=check_box_tag "select_user[]", user.id
    %br
    = button_tag 'Delete Users', name: "delete"
    = button_tag 'Give Admin', name: "giveadmin"
    = button_tag 'Remove Admin', name: "removeadmin"