Merge branches 'cache/harvests' and 'cache/harvests' of github.com:Br3nda/growstuff into cache/harvests

This commit is contained in:
Brenda Wallace
2019-12-27 09:04:56 +13:00
4 changed files with 4 additions and 4 deletions

View File

@@ -89,7 +89,7 @@ module ButtonsHelper
end
def planting_harvest_button(planting, classes: 'btn btn-default')
return unless planting.active? && can?(:create, Harvest) && can?(:edit, planting)
return unless planting.active && can?(:create, Harvest) && can?(:edit, planting)
link_to new_planting_harvest_path(planting), class: classes do
harvest_icon + ' ' + t('buttons.record_harvest')

View File

@@ -16,7 +16,7 @@ module PhotoCapable
end
def thumbnail_url
default_photo ? default_photos.thumbnail_url : nil
default_photo ? default_photo.thumbnail_url : nil
end
def most_liked_photo

View File

@@ -4,7 +4,7 @@
.dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "planting-actions-button"}
= planting_edit_button(planting, classes: 'dropdown-item')
= add_photo_button(planting, classes: 'dropdown-item')
- if planting.active?
- if planting.active
= planting_finish_button(planting, classes: 'dropdown-item')
= planting_harvest_button(planting, classes: 'dropdown-item')
= planting_save_seeds_button(planting, classes: 'dropdown-item')

View File

@@ -6,7 +6,7 @@
%li= planting_edit_button(planting, classes: 'dropdown-item')
%li= add_photo_button(planting, classes: 'dropdown-item')
- if planting.active?
- if planting.active
%li= planting_finish_button(planting, classes: 'dropdown-item')
%li= planting_harvest_button(planting, classes: 'dropdown-item')
%li= planting_save_seeds_button(planting, classes: 'dropdown-item')