From 8e62b78cfabec2c1a7a884c24f887fb5efc04f95 Mon Sep 17 00:00:00 2001 From: sirwolfgang Date: Sat, 19 Jul 2014 22:24:23 +0000 Subject: [PATCH] add nil error check on error text --- app/views/protips/_grid.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/protips/_grid.html.haml b/app/views/protips/_grid.html.haml index 5ee3b110..314cea86 100644 --- a/app/views/protips/_grid.html.haml +++ b/app/views/protips/_grid.html.haml @@ -4,7 +4,7 @@ - show_ad_every = width*2+width-2 - items = show_job ? protips.each_slice(show_ad_every).map{|row| row.count == show_ad_every ? row.concat(['show-ad', nil]) : row }.flatten : protips -- if collection.respond_to?(:error) +- if collection.respond_to?(:error) && !collection.error.nil? .error ="#{collection.error} Meanwhile you can " =link_to 'create a pro tip', new_protip_path