@@ -31,7 +31,7 @@ module Helpers # :nodoc:
31
31
# of the resource should show the current values of those attributes.
32
32
#
33
33
# 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
35
35
# methods generate an appropriate <tt>form</tt> tag and yield a form
36
36
# builder object that knows the model the form is about. Input fields are
37
37
# created by calling methods defined on the form builder, which means they
@@ -42,7 +42,7 @@ module Helpers # :nodoc:
42
42
#
43
43
# For example, to create a new person you typically set up a new instance of
44
44
# +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+:
46
46
#
47
47
# <%= form_with model: @person do |f| %>
48
48
# <%= f.label :first_name %>:
@@ -784,12 +784,12 @@ def form_with(model: false, scope: nil, url: nil, format: nil, **options, &block
784
784
end
785
785
end
786
786
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
788
788
# doesn't create the form tags themselves. This makes +fields_for+
789
789
# suitable for specifying additional model objects in the same form.
790
790
#
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
793
793
# a FormBuilder object associated with a particular model object to a block,
794
794
# and within the block allows methods to be called on the builder to
795
795
# generate fields associated with the model object. Fields may reflect
@@ -1033,7 +1033,7 @@ def fields_for(record_name, record_object = nil, options = {}, &block)
1033
1033
end
1034
1034
1035
1035
# 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>,
1037
1037
# except it doesn't output the form tags.
1038
1038
#
1039
1039
# # Using a scope prefixes the input field names:
@@ -1057,13 +1057,13 @@ def fields_for(record_name, record_object = nil, options = {}, &block)
1057
1057
# <% end %>
1058
1058
# <% end %>
1059
1059
#
1060
- # Much like + form_with+ a FormBuilder instance associated with the scope
1060
+ # Much like # form_with a FormBuilder instance associated with the scope
1061
1061
# or model is yielded, so any generated field names are prefixed with
1062
1062
# either the passed scope or the scope inferred from the <tt>:model</tt>.
1063
1063
#
1064
1064
# === Mixing with other form helpers
1065
1065
#
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
1067
1067
# match the stand-alone FormHelper methods and methods
1068
1068
# from FormTagHelper:
1069
1069
#
@@ -1221,7 +1221,7 @@ def hidden_field(object_name, method, options = {})
1221
1221
# hash with +options+. These options will be tagged onto the HTML as an HTML element attribute as in the example
1222
1222
# shown.
1223
1223
#
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>.
1225
1225
#
1226
1226
# ==== Options
1227
1227
# * Creates standard HTML attributes for the tag.
0 commit comments