Skip to content

Commit 5e7857d

Browse files
Autolink FormHelper#form_with [ci-skip]
1 parent 61bdbf0 commit 5e7857d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

actionview/lib/action_view/helpers/form_helper.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module Helpers # :nodoc:
3131
# of the resource should show the current values of those attributes.
3232
#
3333
# In \Rails, this is usually achieved by creating the form using either
34-
# +form_with+ or +form_for+ and a number of related helper methods. These
34+
# #form_with or +form_for+ and a number of related helper methods. These
3535
# methods generate an appropriate <tt>form</tt> tag and yield a form
3636
# builder object that knows the model the form is about. Input fields are
3737
# created by calling methods defined on the form builder, which means they
@@ -42,7 +42,7 @@ module Helpers # :nodoc:
4242
#
4343
# For example, to create a new person you typically set up a new instance of
4444
# +Person+ in the <tt>PeopleController#new</tt> action, <tt>@person</tt>, and
45-
# in the view template pass that object to +form_with+ or +form_for+:
45+
# in the view template pass that object to #form_with or +form_for+:
4646
#
4747
# <%= form_with model: @person do |f| %>
4848
# <%= f.label :first_name %>:
@@ -784,12 +784,12 @@ def form_with(model: false, scope: nil, url: nil, format: nil, **options, &block
784784
end
785785
end
786786

787-
# Creates a scope around a specific model object like +form_with+, but
787+
# Creates a scope around a specific model object like #form_with, but
788788
# doesn't create the form tags themselves. This makes +fields_for+
789789
# suitable for specifying additional model objects in the same form.
790790
#
791-
# Although the usage and purpose of +fields_for+ is similar to +form_with+'s,
792-
# its method signature is slightly different. Like +form_with+, it yields
791+
# Although the usage and purpose of +fields_for+ is similar to #form_with's,
792+
# its method signature is slightly different. Like #form_with, it yields
793793
# a FormBuilder object associated with a particular model object to a block,
794794
# and within the block allows methods to be called on the builder to
795795
# generate fields associated with the model object. Fields may reflect
@@ -1033,7 +1033,7 @@ def fields_for(record_name, record_object = nil, options = {}, &block)
10331033
end
10341034

10351035
# Scopes input fields with either an explicit scope or model.
1036-
# Like +form_with+ does with <tt>:scope</tt> or <tt>:model</tt>,
1036+
# Like #form_with does with <tt>:scope</tt> or <tt>:model</tt>,
10371037
# except it doesn't output the form tags.
10381038
#
10391039
# # Using a scope prefixes the input field names:
@@ -1057,13 +1057,13 @@ def fields_for(record_name, record_object = nil, options = {}, &block)
10571057
# <% end %>
10581058
# <% end %>
10591059
#
1060-
# Much like +form_with+ a FormBuilder instance associated with the scope
1060+
# Much like #form_with a FormBuilder instance associated with the scope
10611061
# or model is yielded, so any generated field names are prefixed with
10621062
# either the passed scope or the scope inferred from the <tt>:model</tt>.
10631063
#
10641064
# === Mixing with other form helpers
10651065
#
1066-
# While +form_with+ uses a FormBuilder object it's possible to mix and
1066+
# While #form_with uses a FormBuilder object it's possible to mix and
10671067
# match the stand-alone FormHelper methods and methods
10681068
# from FormTagHelper:
10691069
#
@@ -1221,7 +1221,7 @@ def hidden_field(object_name, method, options = {})
12211221
# hash with +options+. These options will be tagged onto the HTML as an HTML element attribute as in the example
12221222
# shown.
12231223
#
1224-
# Using this method inside a +form_with+ block will set the enclosing form's encoding to <tt>multipart/form-data</tt>.
1224+
# Using this method inside a #form_with block will set the enclosing form's encoding to <tt>multipart/form-data</tt>.
12251225
#
12261226
# ==== Options
12271227
# * Creates standard HTML attributes for the tag.

0 commit comments

Comments
 (0)