libertarian-party/partynest

View on GitHub
app/views/staffs/people/_nav_tabs.html.erb

Summary

Maintainability
Test Coverage
<div class="mb-3">
  <%= nav_tabs(
    :person,
    tab,
    overview: [
      policy([:staff, person]).show?,
      [:staff, person],
    ],
    person_comments: [
      policy([:staff, person, :person_comment]).index?,
      staff_person_person_comments_path(person),
    ],
    relationships: [
      policy([:staff, person, :relationship]).index?,
      staff_person_relationships_path(person),
    ],
    passports: [
      policy([:staff, person, :passport]).index?,
      staff_person_passports_path(person),
    ],
  ) %>
</div>