mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-17 10:15:57 +08:00
add: project category upload logo
This commit is contained in:
@@ -21,6 +21,14 @@ class ProjectCategory < ApplicationRecord
|
||||
has_ancestry
|
||||
|
||||
def logo_url
|
||||
""
|
||||
image_url('logo')
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def image_url(type)
|
||||
return nil unless Util::FileManage.exists?(self, type)
|
||||
Util::FileManage.source_disk_file_url(self, type)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user