From fd80fc98f1f71b3fd3c37a3f6c92ef5ccd522abe Mon Sep 17 00:00:00 2001 From: Brenda Date: Sat, 29 Feb 2020 13:26:20 +1300 Subject: [PATCH] use a default icon if no plant_part icon --- app/helpers/icons_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index 753a42171..4c366b314 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -92,7 +92,7 @@ module IconsHelper end def plant_part_icon(name) - image_icon "plant_parts/#{name}" if Files.exists? Rails.root.join('app', 'assets', 'images', 'icons', "{name}.svg") + image_icon "plant_parts/#{name}" if File.exist? Rails.root.join('app', 'assets', 'images', 'icons', "{name}.svg") planting_icon end