Remove unused errors on attachment methods

They aren't used since commit f8d78ec4a.
This commit is contained in:
Javi Martín
2021-06-20 13:34:54 +02:00
parent 7db4a91d78
commit a7ed1f9a37
2 changed files with 0 additions and 8 deletions

View File

@@ -3,10 +3,6 @@ module DocumentsHelper
document.attachment_file_name document.attachment_file_name
end end
def document_errors_on_attachment(document)
document.errors[:attachment].join(", ") if document.errors.key?(:attachment)
end
def render_destroy_document_link(builder, document) def render_destroy_document_link(builder, document)
if !document.persisted? && document.cached_attachment.present? if !document.persisted? && document.cached_attachment.present?
link_to t("documents.form.delete_button"), link_to t("documents.form.delete_button"),

View File

@@ -13,10 +13,6 @@ module ImagesHelper
image.attachment_file_name image.attachment_file_name
end end
def image_errors_on_attachment(image)
image.errors[:attachment].join(", ") if image.errors.key?(:attachment)
end
def image_class(image) def image_class(image)
image.persisted? ? "persisted-image" : "cached-image" image.persisted? ? "persisted-image" : "cached-image"
end end