AndrewMcBurney/petermcburney.com

View on GitHub
app/views/admin/partials/_artwork_table.html.slim

Summary

Maintainability
Test Coverage
section
  h1= label
  hr
  = link_to 'New Artwork', new_artwork_path
  br

  table
    thead
      tr
        th Title
        th Featured
        th For sale
        th Type
        th Size
        th Price
        th[colspan='3']
    tbody
      - @artworks.each do |artwork|
        tr
          td= artwork.title
          td= artwork.featured
          td= artwork.for_sale
          td= artwork.artwork_type
          td= artwork.size
          td= artwork.price
          td= link_to 'Show', artwork
          td= link_to 'Edit', edit_artwork_path(artwork)
          td= link_to 'Destroy', artwork, method: :delete, data: { confirm: 'Are you sure?' }