@@ -91,11 +91,11 @@ def form_tag(url_for_options = {}, options = {}, &block)
91
91
# attribute name.
92
92
#
93
93
# <%= label_tag :post, :title %>
94
- # <%= text_field_tag :post, :title, aria: { describedby: field_id(:post, :title, :error) } %>
94
+ # <%= text_field :post, :title, aria: { describedby: field_id(:post, :title, :error) } %>
95
95
# <%= tag.span("is blank", id: field_id(:post, :title, :error) %>
96
96
#
97
97
# In the example above, the <tt><input type="text"></tt> element built by
98
- # the call to <tt>text_field_tag </tt> declares an
98
+ # the call to <tt>text_field </tt> declares an
99
99
# <tt>aria-describedby</tt> attribute referencing the <tt><span></tt>
100
100
# element, sharing a common <tt>id</tt> root (<tt>post_title</tt>, in this
101
101
# case).
@@ -123,11 +123,11 @@ def field_id(object_name, method_name, *suffixes, index: nil, namespace: nil)
123
123
# Return the value generated by the <tt>FormBuilder</tt> for the given
124
124
# attribute name.
125
125
#
126
- # <%= text_field_tag :post, :title, name: field_name(:post, :title, :subtitle) %>
127
- # <%# => <input type="text" name="post[title][subtitle]">
126
+ # <%= text_field :post, :title, name: field_name(:post, :title, :subtitle) %>
127
+ # <%# => <input type="text" name="post[title][subtitle]"> %>
128
128
#
129
- # <%= text_field_tag :post, :tag, name: field_name(:post, :tag, multiple: true) %>
130
- # <%# => <input type="text" name="post[tag][]">
129
+ # <%= text_field :post, :tag, name: field_name(:post, :tag, multiple: true) %>
130
+ # <%# => <input type="text" name="post[tag][]"> %>
131
131
#
132
132
def field_name ( object_name , method_name , *method_names , multiple : false , index : nil )
133
133
names = method_names . map! { |name | "[#{ name } ]" } . join
0 commit comments