diff options
author | Andrew Newdigate <andrew@gitlab.com> | 2017-10-26 19:15:07 +0100 |
---|---|---|
committer | Andrew Newdigate <andrew@gitlab.com> | 2017-10-26 19:15:07 +0100 |
commit | 505c3aa3bd3faba442ecce6407a9cf1e6b863701 (patch) | |
tree | 99a01b6a7caf59931cba43877f494958c6f3f603 | |
parent | 65ea038551c7461a536ff850bc3d0e061a22651f (diff) | |
download | gitlab-ce-performance-bar-on-dev.tar.gz |
As per Remy's reviewperformance-bar-on-dev
-rw-r--r-- | app/controllers/concerns/with_performance_bar.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/app/controllers/concerns/with_performance_bar.rb b/app/controllers/concerns/with_performance_bar.rb index 6a71d2c5312..84b67be7c6a 100644 --- a/app/controllers/concerns/with_performance_bar.rb +++ b/app/controllers/concerns/with_performance_bar.rb @@ -9,15 +9,7 @@ module WithPerformanceBar return false unless Gitlab::PerformanceBar.enabled?(current_user) cookie = cookies[:perf_bar_enabled] - - unless cookie.present? - if Rails.env.development? - cookies[:perf_bar_enabled] = 'true' - return true - else - return false - end - end + cookie ||= (cookies[:perf_bar_enabled] = 'true') if Rails.env.development? cookie === 'true' end |