mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-18 21:56:55 -04:00
caching plant parts
This commit is contained in:
@@ -13,18 +13,19 @@
|
||||
.index-cards
|
||||
- harvest.crop.plant_parts.order(:name).each do |plant_part|
|
||||
.card
|
||||
= link_to @planting ? harvests_path(return: 'planting', harvest: {crop_id: @planting.crop_id, planting_id: @planting.id, plant_part_id: plant_part.id}, method: :post) : harvests_path(harvest: {crop_id: harvest.crop.id, plant_part_id: plant_part.id}, method: :post) do
|
||||
= link_to harvests_path(harvest: {crop_id: harvest.crop_id, plant_part_id: plant_part.id}), method: :post do
|
||||
.card-title.text-center
|
||||
%h3= plant_part_icon(plant_part.name)
|
||||
%h3= plant_part.name
|
||||
|
||||
%hr/
|
||||
%h6 All Plant parts
|
||||
%nav.nav
|
||||
- PlantPart.all.order(:name).each do |plant_part|
|
||||
= link_to @planting ? harvests_path(return: 'planting', harvest: {crop_id: @planting.crop_id, planting_id: @planting.id, plant_part_id: plant_part.id}, method: :post) : harvests_path(harvest: {crop_id: harvest.crop.id, plant_part_id: plant_part.id}, method: :post), class: 'nav-link' do
|
||||
= plant_part_icon(plant_part.name)
|
||||
= plant_part
|
||||
- cache PlantPart do
|
||||
%h6 All Plant parts
|
||||
%nav.nav
|
||||
- PlantPart.all.order(:name).each do |plant_part|
|
||||
= link_to harvests_path(harvest: {crop_id: harvest.crop_id, plant_part_id: plant_part.id}), method: :post, class: 'nav-link' do
|
||||
= plant_part_icon(plant_part.name)
|
||||
= plant_part
|
||||
|
||||
%a.btn{"data-target" => "#modelHarvestForm", "data-toggle" => "modal", href: ""}
|
||||
Harvest #{harvest.crop.name}
|
||||
|
||||
Reference in New Issue
Block a user