Sha256: 97274306113fdc7a9fc84e210868df61a9faebfdf86757141cc76f60219bc336
Contents?: true
Size: 472 Bytes
Versions: 142
Compression:
Stored size: 472 Bytes
Contents
# frozen_string_literal: true 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
142 entries across 142 versions & 1 rubygems