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>2020-03-16 12:09:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-16 12:09:29 +0300
commit3fd97b4bba24ca412112aad025a38a32c7a6cf8c (patch)
tree4aacc8a184522bcbc3db68df47620bc3d2cfcfd9 /app/models/zoom_meeting.rb
parentc52239391bf29f640e1e0af98edbd337c0293940 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/zoom_meeting.rb')
-rw-r--r--app/models/zoom_meeting.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/zoom_meeting.rb b/app/models/zoom_meeting.rb
index a7ecd1e6a2c..fe2f351018c 100644
--- a/app/models/zoom_meeting.rb
+++ b/app/models/zoom_meeting.rb
@@ -23,4 +23,10 @@ class ZoomMeeting < ApplicationRecord
def self.canonical_meeting_url(issue)
canonical_meeting(issue)&.url
end
+
+ def self.distinct_count_by(column = nil, fallback = -1)
+ distinct.count(column)
+ rescue ActiveRecord::StatementInvalid
+ fallback
+ end
end