ozfortress/citadel

View on GitHub
app/views/leagues/_tiebreaker_fields.html.haml

Summary

Maintainability
Test Coverage
%li.list-group-item.nested-fields
  = f.select(:kind, League::Tiebreaker.kinds.map { |name, _| [name.humanize, name] },
              label_class: 'mr-3', wrapper: { class: 'mr-3 mb-0' })

  = link_to_remove_association f, class: 'btn btn-danger',
      data: { confirm: 'Are you sure you want to delete this Tirbreaker?' } do
    = inline_svg_tag 'open_iconic/trash.svg', class: 'icon'