instance method
fields
Ruby on Rails 5.1.7
Since v5.1.7Signature
fields(scope = nil, model: nil, **options, &block)
See the docs for the ActionView::FormHelper.fields helper method.
Parameters
-
scopeopt = nil -
modelkey = nil -
optionskeyrest -
blockblock
Source
# File actionview/lib/action_view/helpers/form_helper.rb, line 1983
def fields(scope = nil, model: nil, **options, &block)
options[:allow_method_names_outside_object] = true
options[:skip_default_ids] = true
convert_to_legacy_options(options)
fields_for(scope || model, model, **options, &block)
end
Defined in actionview/lib/action_view/helpers/form_helper.rb line 1983
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::FormBuilder