treat harvests as object(not hash) in harvsets rss feed

This commit is contained in:
Brenda Wallace
2019-12-28 09:33:53 +13:00
parent b9e9ce1439
commit 233c5666ad

View File

@@ -1,12 +1,12 @@
%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
= 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
%h5= harvest['crop_name']
%span.badge.badge-success=harvest['plant_part']
%h5= harvest.crop_name
%span.badge.badge-success=harvest.plant_part
%small.text-muted
harvested by #{harvest['owner_name']}
harvested by #{harvest.owner_name}
%p.mb-2
= image_tag harvest['thumbnail_url'], width: 75, class: 'rounded shadow'
= image_tag harvest.thumbnail_url, width: 75, class: 'rounded shadow'