gitlab-org--gitlab-foss/app/models/badges/project_badge.rb
2018-08-03 01:44:16 -07:00

17 lines
293 B
Ruby

# frozen_string_literal: true
class ProjectBadge < Badge
belongs_to :project
validates :project, presence: true
def rendered_link_url(project = nil)
project ||= self.project
super
end
def rendered_image_url(project = nil)
project ||= self.project
super
end
end