Sha256: 30bea46b7fcc52569509abecf85aee3bc987a1513871d82c981d00dda00960aa
Contents?: true
Size: 441 Bytes
Versions: 35
Compression:
Stored size: 441 Bytes
Contents
class HiddenArrayInput < SimpleForm::Inputs::StringInput def input(_wrapper_options) input_html_options[:type] ||= input_type Array(object.public_send(attribute_name)).map do |array_el| @builder.hidden_field( nil, input_html_options.merge( value: array_el, name: "#{object_name}[#{attribute_name}][]" ) ) end.join.html_safe end def input_type :hidden end end
Version data entries
35 entries across 35 versions & 1 rubygems