Skip to content

Commit 490d0f3

Browse files
Avoid autolinking FormBuilder#fields_for to itself [ci-skip]
1 parent 25046a9 commit 490d0f3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

actionview/lib/action_view/helpers/form_helper.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2109,7 +2109,7 @@ def field_name(method, *methods, multiple: false, index: @options[:index])
21092109
# === Nested Attributes Examples
21102110
#
21112111
# When the object belonging to the current scope has a nested attribute
2112-
# writer for a certain attribute, fields_for will yield a new scope
2112+
# writer for a certain attribute, +fields_for+ will yield a new scope
21132113
# for that attribute. This allows you to create forms that set or change
21142114
# the attributes of a parent object and its associations in one go.
21152115
#
@@ -2140,7 +2140,7 @@ def field_name(method, *methods, multiple: false, index: @options[:index])
21402140
# end
21412141
# end
21422142
#
2143-
# This model can now be used with a nested fields_for, like so:
2143+
# This model can now be used with a nested +fields_for+, like so:
21442144
#
21452145
# <%= form_with model: @person do |person_form| %>
21462146
# ...
@@ -2198,7 +2198,7 @@ def field_name(method, *methods, multiple: false, index: @options[:index])
21982198
# end
21992199
#
22002200
# Note that the <tt>projects_attributes=</tt> writer method is in fact
2201-
# required for fields_for to correctly identify <tt>:projects</tt> as a
2201+
# required for +fields_for+ to correctly identify <tt>:projects</tt> as a
22022202
# collection, and the correct indices to be set in the form markup.
22032203
#
22042204
# When projects is already an association on Person you can use
@@ -2209,8 +2209,8 @@ def field_name(method, *methods, multiple: false, index: @options[:index])
22092209
# accepts_nested_attributes_for :projects
22102210
# end
22112211
#
2212-
# This model can now be used with a nested fields_for. The block given to
2213-
# the nested fields_for call will be repeated for each instance in the
2212+
# This model can now be used with a nested +fields_for+. The block given to
2213+
# the nested +fields_for+ call will be repeated for each instance in the
22142214
# collection:
22152215
#
22162216
# <%= form_with model: @person do |person_form| %>
@@ -2282,10 +2282,10 @@ def field_name(method, *methods, multiple: false, index: @options[:index])
22822282
# ...
22832283
# <% end %>
22842284
#
2285-
# Note that fields_for will automatically generate a hidden field
2285+
# Note that +fields_for+ will automatically generate a hidden field
22862286
# to store the ID of the record. There are circumstances where this
22872287
# hidden field is not needed and you can pass <tt>include_id: false</tt>
2288-
# to prevent fields_for from rendering it automatically.
2288+
# to prevent +fields_for+ from rendering it automatically.
22892289
def fields_for(record_name, record_object = nil, fields_options = nil, &block)
22902290
fields_options, record_object = record_object, nil if fields_options.nil? && record_object.is_a?(Hash) && record_object.extractable_options?
22912291
fields_options ||= {}

0 commit comments

Comments
 (0)