mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
fix default image url
This commit is contained in:
parent
d614ee1f03
commit
2fb72180d2
@ -10,7 +10,7 @@ class ContentPage < ApplicationRecord
|
||||
self.authorizer_name = 'ContentPageAuthorizer'
|
||||
|
||||
def random_image_including_private(format: :small)
|
||||
ImageUpload.where(content_type: self.page_type, content_id: self.id).sample.try(:src, format) || "card-headers/#{self.page_type.downcase.pluralize}.jpg"
|
||||
ImageUpload.where(content_type: self.page_type, content_id: self.id).sample.try(:src, format) || "/assets/card-headers/#{self.page_type.downcase.pluralize}.jpg"
|
||||
end
|
||||
|
||||
def icon
|
||||
|
||||
Loading…
Reference in New Issue
Block a user