fix default image url

This commit is contained in:
Andrew Brown 2021-08-09 12:10:18 -07:00
parent d614ee1f03
commit 2fb72180d2

View File

@ -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