class UiBibzInputs::UiChoiceFieldInput
Public Instance Methods
input(_wrapper_options)
click to toggle source
# File lib/ui_bibz/inputs/ui_bibz_inputs/ui_choice_field_input.rb, line 7 def input(_wrapper_options) UiBibz::Ui::Core::Forms::Choices::Choice.new(input_attribute_name, new_options, new_input_html_options).render end
new_input_html_options()
click to toggle source
# File lib/ui_bibz/inputs/ui_bibz_inputs/ui_choice_field_input.rb, line 11 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_choice_field_input.rb, line 19 def new_options options.merge({ label: options[:old_label] || attribute_name.to_s.titleize }) end
value()
click to toggle source
# File lib/ui_bibz/inputs/ui_bibz_inputs/ui_choice_field_input.rb, line 15 def value @value ||= @builder.object.send(attribute_name) end