Sha256: f49882d904c5f19b97cf924074f473461175f3e66b287bae5f8275d24fb596d2
Contents?: true
Size: 625 Bytes
Versions: 6
Compression:
Stored size: 625 Bytes
Contents
# frozen_string_literal: true module UiBibzInputs class BaseInput < SimpleForm::Inputs::Base include ActionView::Helpers::FormTagHelper def input(wrapper_options) super end def options super.merge({ value: @builder.object.send(attribute_name) }).merge(@builder.options[:input_html] || {}) end private def input_attribute_name new_attribute_name = @builder.lookup_model_names.first.to_s new_attribute_name += "[#{@builder.lookup_model_names.second}_attributes]" if @builder.lookup_model_names.second new_attribute_name + "[#{attribute_name}]" end end end
Version data entries
6 entries across 6 versions & 1 rubygems