use a default icon if no plant_part icon

This commit is contained in:
Brenda committed 2020-02-29 13:26:20 +13:00
1 parent d0154a8b60
commit fd80fc98f1
1 file changed
+1 -1
+1 -1
View File
@@ -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