Growstuff/growstuff

View on GitHub
app/views/harvests/_card.html.haml

Summary

Maintainability
Test Coverage
- cache harvest do
  .card
    = link_to harvest_path(slug: harvest.slug) do
      = image_tag harvest.thumbnail_url ? harvest.thumbnail_url : placeholder_image, alt: harvest.crop_name, class: 'img-card'
    .card-body
      %h5
        %strong= link_to harvest.crop_name, harvest_path(slug: harvest.slug)
        %span.badge.badge-pill= harvest.plant_part_name
    .card-footer
      .float-right
        %span.chip.member-chip
          = link_to member_path(slug: harvest.owner_slug) do
            = harvest.owner_login_name