Files
growstuff/app/views/home/_stats.html.haml
T

9 lines
503 B
Plaintext

-# expires_in bounds staleness: expire_fragment only clears the cache of the
-# process that handled the write, and the cache store may be per process.
- cache("home_stats", expires_in: 12.hours) do
.home-stats
- [[Member.confirmed.size, members_path, :members], [Planting.count, plantings_path, :plantings], [Crop.count, crops_path, :crops]].each do |count, path, key|
= link_to path, class: 'home-stat' do
%strong= number_with_delimiter(count)
= t(".#{key}", count: count)