Sha256: 48ca0f89e4e7e0388da20a3894bf0e28fca8a72e86ead571b5d6e8cb28d95164
Contents?: true
Size: 591 Bytes
Versions: 8
Compression:
Stored size: 591 Bytes
Contents
# frozen_string_literal: true module UiBibzInputs class UiCheckboxFieldInput < BaseInput include UiBibz::Ui::Core::Forms::Choices def input(_wrapper_options) UiBibz::Ui::Core::Forms::Choices::CheckboxField.new(input_attribute_name, new_options, new_input_html_options).render end def new_input_html_options input_html_options.merge({ checked: value.nil? ? false : value }) end def value @value ||= @builder.object.send(attribute_name) end def new_options options.merge({ label: attribute_name.to_s.titleize }) end end end
Version data entries
8 entries across 8 versions & 1 rubygems