libertarian-party/partynest

View on GitHub
app/views/settings/_nav_sidebar.html.erb

Summary

Maintainability
Test Coverage
<%= nav_sidebar(
  :settings,
  tab,
  profile: [
    policy(%i[settings profile]).edit?,
    edit_settings_profile_path,
  ],
  credentials: [
    policy(%i[users registration]).edit?,
    edit_user_registration_path,
  ],
  appearance: [
    policy(%i[settings appearance]).edit?,
    edit_settings_appearance_path,
  ],
  person: [
    policy([:settings, Person]).show?,
    settings_person_path,
  ],
  contacts: [
    policy([:settings, Contact]).index?,
    settings_contacts_path,
  ],
  sessions: [
    policy([:settings, Session]).index?,
    settings_sessions_path,
  ],
) %>