I use the pearl simple_form.
I present a collection based entry (list of all mine actiontypes)
<%= f.association :actiontype, collection: Actiontype.all, input_html: { data: {'impacts-pnl' => ??}} %>
I would like to be able to add a data attribute to the input to store additional data.
In this case, I want to keep the attribute of impacts_pnlmine actiontype. The only problem is that I do not know how to refer to the currentactiontype
collection.impacts_pnl not working (obviously)
actiontype.impacts_pnl neither.
How can I transfer this extra bit of data to my input?
source
share