From 946b4519c99a91c18a23041c090568231410785a Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Wed, 6 Apr 2016 16:31:34 -0500 Subject: [PATCH] Use .new_record? instead --- app/views/layouts/_search.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_search.html.haml b/app/views/layouts/_search.html.haml index ce9df1566d5..baa93ba4c1d 100644 --- a/app/views/layouts/_search.html.haml +++ b/app/views/layouts/_search.html.haml @@ -1,6 +1,6 @@ -- if controller.controller_path =~ /^groups/ && !@group.new_record? +- if controller.controller_path =~ /^groups/ && @group.persisted? - label = 'This group' -- if controller.controller_path =~ /^projects/ && !@project.new_record? +- if controller.controller_path =~ /^projects/ && @project.persisted? - label = 'This project' .search.search-form{class: "#{'has-location-badge' if label.present?}"} -- GitLab