How can I make my symbol dynamic with an incremental number like this:
@order.products.each do |product,num|
= f.input :aanbod+num.to_s
This form is equivalent to "aanbod#{num}".to_sym
and more concise:
= f.input :"aanbod#{num}"
= f.input ("aanbod" + num.to_s).to_sym
or
= f.input "aanbod#{num}".to_sym
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With