Skip to content

Commit 13afb69

Browse files
Avoid autolinking FormHelper#fields_for to itself [ci-skip]
1 parent 728a2d5 commit 13afb69

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

actionview/lib/action_view/helpers/form_helper.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ def form_with(model: false, scope: nil, url: nil, format: nil, **options, &block
848848
# === Nested Attributes Examples
849849
#
850850
# When the object belonging to the current scope has a nested attribute
851-
# writer for a certain attribute, fields_for will yield a new scope
851+
# writer for a certain attribute, +fields_for+ will yield a new scope
852852
# for that attribute. This allows you to create forms that set or change
853853
# the attributes of a parent object and its associations in one go.
854854
#
@@ -937,7 +937,7 @@ def form_with(model: false, scope: nil, url: nil, format: nil, **options, &block
937937
# end
938938
#
939939
# Note that the <tt>projects_attributes=</tt> writer method is in fact
940-
# required for fields_for to correctly identify <tt>:projects</tt> as a
940+
# required for +fields_for+ to correctly identify <tt>:projects</tt> as a
941941
# collection, and the correct indices to be set in the form markup.
942942
#
943943
# When projects is already an association on Person you can use
@@ -949,7 +949,7 @@ def form_with(model: false, scope: nil, url: nil, format: nil, **options, &block
949949
# end
950950
#
951951
# This model can now be used with a nested fields_for. The block given to
952-
# the nested fields_for call will be repeated for each instance in the
952+
# the nested +fields_for+ call will be repeated for each instance in the
953953
# collection:
954954
#
955955
# <%= form_with model: @person do |person_form| %>
@@ -1021,10 +1021,10 @@ def form_with(model: false, scope: nil, url: nil, format: nil, **options, &block
10211021
# ...
10221022
# <% end %>
10231023
#
1024-
# Note that fields_for will automatically generate a hidden field
1024+
# Note that +fields_for+ will automatically generate a hidden field
10251025
# to store the ID of the record if it responds to <tt>persisted?</tt>.
10261026
# There are circumstances where this hidden field is not needed and you
1027-
# can pass <tt>include_id: false</tt> to prevent fields_for from
1027+
# can pass <tt>include_id: false</tt> to prevent +fields_for+ from
10281028
# rendering it automatically.
10291029
def fields_for(record_name, record_object = nil, options = {}, &block)
10301030
options = { model: record_object, allow_method_names_outside_object: false, skip_default_ids: false }.merge!(options)

0 commit comments

Comments
 (0)