From bb32f61799378096c0ac01fec78d128ddbb7bf2c Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Sat, 24 Sep 2016 02:40:12 +0200 Subject: [PATCH] Avoid 500s when all fields on content are filled already --- app/views/cards/serendipitous/_content_question.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/cards/serendipitous/_content_question.html.erb b/app/views/cards/serendipitous/_content_question.html.erb index 84564a86..84cea5ae 100644 --- a/app/views/cards/serendipitous/_content_question.html.erb +++ b/app/views/cards/serendipitous/_content_question.html.erb @@ -1,4 +1,4 @@ -<% if question && !content.send(question[:field]).is_a?(ActiveRecord::Associations::CollectionProxy) %> +<% if question && question[:field] && !content.send(question[:field]).is_a?(ActiveRecord::Associations::CollectionProxy) %>
<%= content.class.icon %>` <%= question[:question] %>