johnrees/fablabs

View on GitHub
app/views/projects/_header.html.haml

Summary

Maintainability
Test Coverage
.view-as
  .btn-group.w-100.d-flex
    = link_to projects_path, class: "list btn #{action_name == 'index' ? 'btn-primary' : 'btn-default'}" do
      = icon "list", t("projects.index.list", default: "List")
    = link_to map_projects_path, class: "map btn #{action_name == 'map' ? 'btn-primary' : 'btn-default'}" do
      = icon "globe", t("projects.index.map", default: "Map")