diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-22 12:06:20 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-22 12:06:20 +0300 |
commit | 8a3fdede9607c806d88856d46d4f5394b630a006 (patch) | |
tree | 869139549ac3bd687fcf1286d6dd50b1d785702e /app/models/badge.rb | |
parent | 8e75748aabcbcea411f8bbc68936805bc2b5ff0c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/badge.rb')
-rw-r--r-- | app/models/badge.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/badge.rb b/app/models/badge.rb index 50299cd6652..eb351425e66 100644 --- a/app/models/badge.rb +++ b/app/models/badge.rb @@ -22,6 +22,8 @@ class Badge < ApplicationRecord scope :order_created_at_asc, -> { reorder(created_at: :asc) } + scope :with_name, ->(name) { where(name: name) } + validates :link_url, :image_url, addressable_url: true validates :type, presence: true |