Sha256: 86c071cdde01d1c71702abd9dea9dc960b8dd9207b9c166a6337ff2eb863a1be
Contents?: true
Size: 560 Bytes
Versions: 21
Compression:
Stored size: 560 Bytes
Contents
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
21 entries across 21 versions & 1 rubygems