mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-27 11:14:31 -04:00
Memcache caching of harvests
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
.card
|
||||
= link_to harvest do
|
||||
= image_tag harvest_image_path(harvest), alt: harvest, class: 'img-card'
|
||||
.card-body
|
||||
%h5
|
||||
= crop_icon(harvest.crop)
|
||||
%strong
|
||||
= link_to harvest.crop, harvest
|
||||
%span.badge.badge-pill= harvest.plant_part
|
||||
.card-footer
|
||||
.float-right=render 'members/tiny', member: harvest.owner
|
||||
- cache harvest do
|
||||
.card
|
||||
= link_to harvest do
|
||||
= image_tag harvest_image_path(harvest), alt: harvest, class: 'img-card'
|
||||
.card-body
|
||||
%h5
|
||||
= crop_icon(harvest.crop)
|
||||
%strong
|
||||
= link_to harvest.crop, harvest
|
||||
%span.badge.badge-pill= harvest.plant_part
|
||||
.card-footer
|
||||
.float-right=render 'members/tiny', member: harvest.owner
|
||||
@@ -1,6 +1,4 @@
|
||||
- if local_assigns[:full]
|
||||
- cache harvest do
|
||||
= render 'harvests/card', harvest: harvest
|
||||
= render 'harvests/card', harvest: harvest
|
||||
- else
|
||||
- cache harvest do
|
||||
= render 'harvests/thumbnail', harvest: harvest
|
||||
= render 'harvests/thumbnail', harvest: harvest
|
||||
@@ -1,9 +1,10 @@
|
||||
.card.harvest-thumbnail
|
||||
= link_to image_tag(harvest_image_path(harvest),
|
||||
alt: harvest,
|
||||
class: 'img img-card'),
|
||||
harvest
|
||||
- cache harvest do
|
||||
.card.harvest-thumbnail
|
||||
= link_to image_tag(harvest_image_path(harvest),
|
||||
alt: harvest,
|
||||
class: 'img img-card'),
|
||||
harvest
|
||||
|
||||
.text
|
||||
%h3.harvest-plant-part= link_to harvest.plant_part, harvest
|
||||
%h5.harvest-crop= harvest.crop
|
||||
.text
|
||||
%h3.harvest-plant-part= link_to harvest.plant_part, harvest
|
||||
%h5.harvest-crop= harvest.crop
|
||||
|
||||
@@ -32,5 +32,6 @@
|
||||
%h2
|
||||
= page_entries_info @harvests
|
||||
= will_paginate @harvests
|
||||
.index-cards=render @harvests, full: true
|
||||
.index-cards
|
||||
= render @harvests, full: true
|
||||
= will_paginate @harvests
|
||||
|
||||
Reference in New Issue
Block a user