2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
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
|