Module: Components::FormsHelper

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

Instance Method Summary collapse

Instance Method Details

#render_form_for(obj, **opts) ⇒ Object



8
9
10
11
12
# File 'app/helpers/components/forms_helper.rb', line 8

def render_form_for(obj, **opts)
  form_for(obj, **opts.merge(builder: Shadcn::FormBuilder), html: opts) do |form|
    yield form
  end
end

#render_form_with(**opts) ⇒ Object



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

def render_form_with(**opts)
  form_with(**opts.merge(builder: Shadcn::FormBuilder)) do |form|
    yield form
  end
end