Growstuff/growstuff

View on GitHub
app/views/harvests/_actions.html.haml

Summary

Maintainability
Test Coverage
- if can?(:edit, harvest)
  %span.dropdown.harvest-actions
    %a#harvest-actions-button.btn.btn-info.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", type: "button", href: '#'} Actions
    .dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "harvest-actions-button"}
      = harvest_edit_button(harvest, classes: 'dropdown-item')
      = add_photo_button(harvest, classes: 'dropdown-item')
      .dropdown-divider
      = delete_button(harvest, classes: 'dropdown-item text-danger')