johnrees/fablabs

View on GitHub
app/views/labs/manage_admins.html.haml

Summary

Maintainability
Test Coverage
.row
  .col-lg-12= title "Manage Admins for #{@lab}"
  .col-lg-12.box
    = simple_form_for @lab do |f|
      .field
        %label Lab Creator
        = link_to @lab.creator, @lab.creator

      = f.input :admin_ids, collection: @users, label_method:  :full_name, value_method: :id, input_html: { multiple: true}, selected: @admins.map(&:id), label: "Other Admins"
      = f.submit "Update", class: 'button button-primary btn-lg'