Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-13 21:06:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-13 21:06:51 +0300
commit57e3d49fc0fb99f42ac178761fc6232715734020 (patch)
tree756c435c2f5ec85bb2781fe28789b6f63999aac7 /app/models/grafana_integration.rb
parent3318518149062e5d17105f2170bd7bd9647af415 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/grafana_integration.rb')
-rw-r--r--app/models/grafana_integration.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/grafana_integration.rb b/app/models/grafana_integration.rb
index 620bb4231a0..ed4c279965a 100644
--- a/app/models/grafana_integration.rb
+++ b/app/models/grafana_integration.rb
@@ -16,6 +16,8 @@ class GrafanaIntegration < ApplicationRecord
validates :enabled, inclusion: { in: [true, false] }
+ scope :enabled, -> { where(enabled: true) }
+
def client
return unless enabled?