Remove uneeded lines
Rails form already add an error class when image or document attachments has validations errors.
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user