NerdDiffer/job_tracker

View on GitHub
app/views/job_applications/_filter_active.html.erb

Summary

Maintainability
Test Coverage
<div class="btn-group">
  <% button_opts = {
    type: 'button',
    class: "btn btn-default dropdown-toggle",
    data: { toggle: 'dropdown' },
    aria: { haspopup: "true", expanded: "false" }
  } %>

  <%= button_tag button_opts do %>
    <b>Active</b> <span class='caret'></span>
  <% end %>

  <ul class="dropdown-menu">
    <li><%= link_to 'All', { unscoped: true } %></li>
    <li><%= link_to 'Show active', { active: true } %></li>
    <li><%= link_to 'Show inactive', { active: false } %></li>
  </ul>
</div>