Module: Ariadne::ActionViewExtensions::FormHelper
- Includes:
- ClassNameHelper
- Included in:
- Component
- Defined in:
- app/lib/ariadne/action_view_extensions/form_helper.rb
Overview
:nodoc:
Constant Summary collapse
- DEFAULT_FORM_CLASSES =
"space-y-8 divide-y divide-gray-200 sm:space-y-5"
Instance Method Summary collapse
Methods included from ClassNameHelper
Instance Method Details
#ariadne_form_with(model: nil, scope: nil, url: nil, format: nil, classes: {}, attributes: {}, **options, &block) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'app/lib/ariadne/action_view_extensions/form_helper.rb', line 10 def ariadne_form_with(model: nil, scope: nil, url: nil, format: nil, classes: {}, attributes: {}, **, &block) [:class] = class_names(DEFAULT_FORM_CLASSES, [:class]) [:builder] ||= Ariadne::FormBuilder [:html] ||= {} = .merge(attributes) data = { controller: "ariadne-form", } form_with(model: model, scope: scope, url: url, format: format, data: data, **, &block) end |