class UiBibzInputs::UiCheckboxFieldInput

Public Instance Methods

input(_wrapper_options) click to toggle source
# File lib/ui_bibz/inputs/ui_bibz_inputs/ui_checkbox_field_input.rb, line 11
def input(_wrapper_options)
  UiBibz::Ui::Core::Forms::Choices::CheckboxField.new(input_attribute_name, new_options, new_input_html_options).render
end
label(_wrapper_options) click to toggle source
# File lib/ui_bibz/inputs/ui_bibz_inputs/ui_checkbox_field_input.rb, line 7
def label(_wrapper_options)
  false
end
new_input_html_options() click to toggle source
# File lib/ui_bibz/inputs/ui_bibz_inputs/ui_checkbox_field_input.rb, line 15
def new_input_html_options
  input_html_options.merge({ checked: value.nil? ? false : value })
end
new_options() click to toggle source
# File lib/ui_bibz/inputs/ui_bibz_inputs/ui_checkbox_field_input.rb, line 23
def new_options
  options.merge({ label: options[:label] || attribute_name.to_s.titleize })
end
value() click to toggle source
# File lib/ui_bibz/inputs/ui_bibz_inputs/ui_checkbox_field_input.rb, line 19
def value
  @value ||= @builder.object.send(attribute_name)
end