Class: Shoelace::Rails::Ui::FormHelper::ShoelaceCheckBox
- Inherits:
-
ActionView::Helpers::Tags::CheckBox
- Object
- ActionView::Helpers::Tags::CheckBox
- Shoelace::Rails::Ui::FormHelper::ShoelaceCheckBox
- Defined in:
- app/helpers/shoelace/rails/ui/form_helper.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#render(&block) ⇒ Object
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'app/helpers/shoelace/rails/ui/form_helper.rb', line 130 def render(&block) = @options.stringify_keys ["value"] = @checked_value ["checked"] = true if input_checked?() if ["multiple"] add_default_name_and_id_for_value(@checked_value, ) .delete("multiple") else add_default_name_and_id() end if block_given? @template_object.content_tag('sl-checkbox', '', , &block) else @template_object.content_tag('sl-checkbox', @method_name.to_s.humanize, ) end end |