instance method
html_options_for_form_with
Ruby on Rails 8.1.2
Since v5.2.8.1 PrivateSignature
html_options_for_form_with(url_for_options = nil, model = nil, html: {}, local: !form_with_generates_remote_forms, skip_enforcing_utf8: nil, **options)
No documentation comment.
Parameters
-
url_for_optionsopt = nil -
modelopt = nil -
htmlkey = {} -
localkey = !form_with_generates_remote_forms -
skip_enforcing_utf8key = nil -
optionskeyrest
Source
# File actionview/lib/action_view/helpers/form_helper.rb, line 1595
def html_options_for_form_with(url_for_options = nil, model = nil, html: {}, local: !form_with_generates_remote_forms,
skip_enforcing_utf8: nil, **options)
html_options = options.slice(:id, :class, :multipart, :method, :data, :authenticity_token).merge!(html)
html_options[:remote] = html.delete(:remote) || !local
html_options[:method] ||= :patch if model.respond_to?(:persisted?) && model.persisted?
if skip_enforcing_utf8.nil?
if options.key?(:enforce_utf8)
html_options[:enforce_utf8] = options[:enforce_utf8]
end
else
html_options[:enforce_utf8] = !skip_enforcing_utf8
end
html_options_for_form(url_for_options.nil? ? {} : url_for_options, html_options)
end
Defined in actionview/lib/action_view/helpers/form_helper.rb line 1595
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::FormHelper