Sha256: 13070557ae8f1f3ee31a9607eba8bf4ea5ffc663f010997962b5f148b96feed9
Contents?: true
Size: 462 Bytes
Versions: 24
Compression:
Stored size: 462 Bytes
Contents
module UiBibzInputs class UiSwitchFieldInput < BaseInput include UiBibz::Ui::Core::Forms::Choices def input(wrapper_options) UiBibz::Ui::Core::Forms::Choices::SwitchField.new(input_attribute_name, 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 end end
Version data entries
24 entries across 24 versions & 1 rubygems