29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'app/helpers/hakumi_components/form_helper.rb', line 29
def hakumi_form_with(**options, &block)
options[:builder] ||= HakumiComponents::FormBuilder
layout = options.delete(:layout)
if layout
raw_html_options = options[:html]
html_options = raw_html_options.is_a?(Hash) ? raw_html_options.dup : {}
html_options[:class] = class_names(html_options[:class].to_s, "hakumi-form", "hakumi-form-#{layout}")
options[:html] = html_options
end
form_with(**options, &block)
end
|