suppresion du form_object_name dans input_id

This commit is contained in:
Benoit Queyron 2024-07-30 10:39:12 +02:00
parent 79ba52317a
commit 81932915c6
No known key found for this signature in database
GPG key ID: 7054ED37BB1FF30A

View file

@ -171,9 +171,10 @@ class Attachment::EditComponent < ApplicationComponent
def input_id
if champ.present?
# There is always a single input by champ, its id must match the label "for" attribute.
return champ.input_id
champ.input_id
else
dom_id(@attached_file.record, attribute_name)
end
@form_object_name || dom_id(@attached_file.record, attribute_name)
end
def auto_attach_url