Fix deleted file case in CKEditor
We were getting an error when browsing the server if one file had been deleted.
This commit is contained in:
@@ -5,10 +5,10 @@ class Ckeditor::Picture < Ckeditor::Asset
|
|||||||
validates :storage_data, file_content_type: { allow: /^image\/.*/ }, file_size: { less_than: 2.megabytes }
|
validates :storage_data, file_content_type: { allow: /^image\/.*/ }, file_size: { less_than: 2.megabytes }
|
||||||
|
|
||||||
def url_content
|
def url_content
|
||||||
rails_representation_url(storage_data.variant(resize: "800>").processed, only_path: true)
|
rails_representation_url(storage_data.variant(resize: "800>"), only_path: true)
|
||||||
end
|
end
|
||||||
|
|
||||||
def url_thumb
|
def url_thumb
|
||||||
rails_representation_url(storage_data.variant(resize: "118x100").processed, only_path: true)
|
rails_representation_url(storage_data.variant(resize: "118x100"), only_path: true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user