From 16ffafb4ebbc7118b50a09205666ffafda05ad6b Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 18 Feb 2012 21:30:49 +0100 Subject: graceful handling of weird search results --- app/views/search/_search_result.html.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/search/_search_result.html.erb b/app/views/search/_search_result.html.erb index a1c0274..14898a2 100644 --- a/app/views/search/_search_result.html.erb +++ b/app/views/search/_search_result.html.erb @@ -1,4 +1,6 @@ +<% if node.head %>
-

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

-

<%= node.head.abstract %>

-
\ No newline at end of file +

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

+

<%= node.head.abstract %>

+ +<% end %> \ No newline at end of file -- cgit v1.3