From f3f7dd02d159339f1e139677d283775d670f4029 Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Tue, 25 Jul 2017 11:40:02 -0700 Subject: [PATCH] safely call html_safe on category description The `categories.description` column is not modified as "not null", so it is possible for the description to be nil. This changes the code not call html_safe on nil. --- app/views/categories/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/categories/index.html.erb b/app/views/categories/index.html.erb index 5084a7e01f4..2733cc8167b 100644 --- a/app/views/categories/index.html.erb +++ b/app/views/categories/index.html.erb @@ -6,7 +6,7 @@

<%= c.name %>

- <%= c.description.html_safe %> + <%= c.description&.html_safe %> <% end %>