@@ -2109,7 +2109,7 @@ def field_name(method, *methods, multiple: false, index: @options[:index])
2109
2109
# === Nested Attributes Examples
2110
2110
#
2111
2111
# 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
2113
2113
# for that attribute. This allows you to create forms that set or change
2114
2114
# the attributes of a parent object and its associations in one go.
2115
2115
#
@@ -2140,7 +2140,7 @@ def field_name(method, *methods, multiple: false, index: @options[:index])
2140
2140
# end
2141
2141
# end
2142
2142
#
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:
2144
2144
#
2145
2145
# <%= form_with model: @person do |person_form| %>
2146
2146
# ...
@@ -2198,7 +2198,7 @@ def field_name(method, *methods, multiple: false, index: @options[:index])
2198
2198
# end
2199
2199
#
2200
2200
# 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
2202
2202
# collection, and the correct indices to be set in the form markup.
2203
2203
#
2204
2204
# 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])
2209
2209
# accepts_nested_attributes_for :projects
2210
2210
# end
2211
2211
#
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
2214
2214
# collection:
2215
2215
#
2216
2216
# <%= form_with model: @person do |person_form| %>
@@ -2282,10 +2282,10 @@ def field_name(method, *methods, multiple: false, index: @options[:index])
2282
2282
# ...
2283
2283
# <% end %>
2284
2284
#
2285
- # Note that fields_for will automatically generate a hidden field
2285
+ # Note that + fields_for+ will automatically generate a hidden field
2286
2286
# to store the ID of the record. There are circumstances where this
2287
2287
# 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.
2289
2289
def fields_for ( record_name , record_object = nil , fields_options = nil , &block )
2290
2290
fields_options , record_object = record_object , nil if fields_options . nil? && record_object . is_a? ( Hash ) && record_object . extractable_options?
2291
2291
fields_options ||= { }
0 commit comments