diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-16 12:09:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-16 12:09:29 +0300 |
commit | 3fd97b4bba24ca412112aad025a38a32c7a6cf8c (patch) | |
tree | 4aacc8a184522bcbc3db68df47620bc3d2cfcfd9 /app/models/zoom_meeting.rb | |
parent | c52239391bf29f640e1e0af98edbd337c0293940 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/zoom_meeting.rb')
-rw-r--r-- | app/models/zoom_meeting.rb | 6 |
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 |