app/views/home/_harvests.html.haml
%h2= t('.recently_harvested')
- Harvest.homepage_records(6).each do |harvest|
- cache harvest do
= link_to harvest_path(slug: harvest.slug), class: 'list-group-item list-group-item-action flex-column align-items-start' do
.d-flex.w-100.justify-content-between.homepage--list-item
%div
%h4= harvest.crop_name
%span.badge.badge-success=harvest.plant_part
%small.text-muted
harvested by #{harvest.owner_login_name}
%p.mb-2
= image_tag harvest.thumbnail_url, width: 75, class: 'rounded shadow', alt: "Image of #{harvest.crop_name} by #{harvest.owner}"