Class: Shoelace::Rails::Ui::FormHelper::ShoelaceSwitch
- Inherits:
-
ActionView::Helpers::Tags::TextField
- Object
- ActionView::Helpers::Tags::TextField
- Shoelace::Rails::Ui::FormHelper::ShoelaceSwitch
- Defined in:
- app/helpers/shoelace/rails/ui/form_helper.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#field_type ⇒ Object
78 |
# File 'app/helpers/shoelace/rails/ui/form_helper.rb', line 78 def field_type; nil; end |
#render(&block) ⇒ Object
80 81 82 83 84 85 86 |
# File 'app/helpers/shoelace/rails/ui/form_helper.rb', line 80 def render(&block) = @options.stringify_keys ["value"] = .fetch("value") { value_before_type_cast } add_default_name_and_id() @template_object.content_tag('sl-switch', @method_name.to_s.humanize, , &block) end |