Module: Components::ToggleHelper

Defined in:
app/helpers/components/toggle_helper.rb

Instance Method Summary collapse

Instance Method Details

#render_toggle(label = nil, **options, &block) ⇒ Object



2
3
4
5
# File 'app/helpers/components/toggle_helper.rb', line 2

def render_toggle(label = nil, **options, &block)
  content = label || capture(&block)
  render "components/ui/toggle", content: content, **options
end