Merge pull request #3717 from rockandror/file-uploads-label-errors

Remove attachment useless code to show errors
This commit is contained in:
Javier Martín
2019-09-23 12:53:10 +02:00
committed by GitHub
2 changed files with 0 additions and 2 deletions

View File

@@ -32,7 +32,6 @@ module DocumentsHelper
end
def render_attachment(builder, document)
klass = document.errors[:attachment].any? ? "error" : ""
klass = document.persisted? || document.cached_attachment.present? ? " hide" : ""
html = builder.label :attachment,
t("documents.form.attachment_label"),

View File

@@ -46,7 +46,6 @@ module ImagesHelper
end
def render_image_attachment(builder, imageable, image)
klass = image.errors[:attachment].any? ? "error" : ""
klass = image.persisted? || image.cached_attachment.present? ? " hide" : ""
html = builder.label :attachment,
t("images.form.attachment_label"),