From 2cded5c6ae21877748199575e2b8525f033a837f Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 18 Feb 2012 21:16:22 +0100 Subject: handle missing node gracefully --- app/views/search/_search_result.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/search/_search_result.html.erb b/app/views/search/_search_result.html.erb index b480f89..a1c0274 100644 --- a/app/views/search/_search_result.html.erb +++ b/app/views/search/_search_result.html.erb @@ -1,4 +1,4 @@
-

<%= link_to node.head.title, content_path(node.unique_path) %>

+

<%= link_to ( node.head ? node.head.title : "No title" ), content_path(node.unique_path) %>

<%= node.head.abstract %>

\ No newline at end of file -- cgit v1.3