Skip to content
This repository was archived by the owner on Apr 29, 2022. It is now read-only.

Commit c3908f4

Browse files
committed
Bugfix
1 parent 6a80b78 commit c3908f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/views/cooking_recipes/show.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<% @cooking_recipe.necessities.each do |necessity| %>
4545
<li>
4646
<%= number_to_human(necessity.amount) %> <%= necessity.unit.try(:name) %> <%= necessity.ingredient.try(:name) %>
47-
<% if necessity.ingredient.description %>
47+
<% if necessity.ingredient && necessity.ingredient.description %>
4848
<span class="ingredient_description">(<%= necessity.ingredient.description %>)</span>
4949
<% end %>
5050
</li>

0 commit comments

Comments
 (0)