Module: Golden::FormHelper

Defined in:
lib/golden/action_view/form_helper.rb

Instance Method Summary collapse

Instance Method Details

#golden_form_with(**options, &block) ⇒ Object



5
6
7
8
9
10
# File 'lib/golden/action_view/form_helper.rb', line 5

def golden_form_with(**options, &block)
  model = options[:model]
  default_options = { builder: ::Golden::FormBuilder }
  default_options.merge!({ scope: :query, url: model.query_url }) if model.respond_to? :query_url
  form_with(**default_options.merge(options), &block)
end