From 610a5b7a48c30dd540f1237ab67ed337e30dc75d Mon Sep 17 00:00:00 2001 From: Logan Gingerich Date: Sat, 18 Nov 2017 09:30:43 -0700 Subject: [PATCH] deleted line 70 on plantings view to clean up logic --- app/views/plantings/show.html.haml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/plantings/show.html.haml b/app/views/plantings/show.html.haml index b0208f34a..ebddd779e 100644 --- a/app/views/plantings/show.html.haml +++ b/app/views/plantings/show.html.haml @@ -67,9 +67,8 @@ %p= render 'plantings/progress', planting: @planting, show_explanation: true = render 'plantings/actions', planting: @planting - - if !@planting.photos.empty? || (can?(:edit, @planting) && can?(:create, Photo)) - - if can?(:create, Photo) && can?(:edit, @planting) - = link_to "Add photo", new_photo_path(type: "planting", id: @planting.id), class: 'btn btn-primary btn-xs' + - if can?(:create, Photo) && can?(:edit, @planting) + = link_to "Add photo", new_photo_path(type: "planting", id: @planting.id), class: 'btn btn-primary btn-xs' .col-md-6 = render partial: "crops/index_card", locals: { crop: @planting.crop }