lfzawacki/musical-artifacts

View on GitHub
app/views/artifacts/_buttons.html.haml

Summary

Maintainability
Test Coverage
.artifact-buttons

  %p
    - if can?(:edit, artifact)
      = link_to edit_artifact_path(artifact), class: 'btn btn-default' do
        %i.fa.fa-edit
        = t('_other.edit')

    - if can?(:destroy, artifact)
      = link_to artifact, class: 'btn btn-danger', method: :delete, data: { confirm: t('_other.confirm') } do
        %i.fa.fa-flash
        = t('_other.destroy')