diff options
| author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-06 16:31:34 -0500 |
|---|---|---|
| committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-06 16:31:34 -0500 |
| commit | 946b4519c99a91c18a23041c090568231410785a (patch) | |
| tree | 1cc3d6767a12df4a5f656f47ab6232ac0fb40e95 | |
| parent | d2afeb8dde7837688bdaaf8575d6621a8b42ba7f (diff) | |
| download | gitlab-ce-946b4519c99a91c18a23041c090568231410785a.tar.gz | |
Use .new_record? instead
| -rw-r--r-- | app/views/layouts/_search.html.haml | 4 |
1 files 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?}"} |
