gitlab-org--gitlab-foss/app/models/badges/project_badge.rb
2018-03-05 17:51:40 +00:00

15 lines
262 B
Ruby

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