fix: edit_component field_name signature

field_name is called by
actionview-7.0.4.2/lib/action_view/helpers/tags/base.rb who pass 3
arguments. We need to be compliant in order to make it valid.

We reuse the same method signature with nil default values as those
params are not being used.
This commit is contained in:
Nicolas Cavigneaux 2023-03-13 09:09:20 +01:00 committed by Colin Darie
parent db71323b92
commit f78b415c51
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
2 changed files with 1 additions and 40 deletions

View file

@ -93,7 +93,7 @@ class Attachment::EditComponent < ApplicationComponent
nil
end
def field_name
def field_name(object_name = nil, method_name = nil, *method_names, multiple: false, index: nil)
helpers.field_name(@form_object_name || ActiveModel::Naming.param_key(@attached_file.record), attribute_name)
end