19 lines
314 B
Ruby
19 lines
314 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ProjectBadge < Badge
|
|
include EachBatch
|
|
|
|
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
|