class ActionView::Helpers::FormBuilder

def field_id(method, *suffixes, namespace: @options[:namespace], index: @options[:index])

case).
element, sharing a common id root (post_title, in this
aria-describedby attribute referencing the
the call to FormBuilder#text_field declares an
In the example above, the element built by

<% end %>
<%= tag.span("is blank", id: f.field_id(:title, :error) %>
<%= f.text_field :title, aria: { describedby: f.field_id(:title, :error) } %>
<%= f.label :title %>
<%= form_for @post do |f| %>

attribute name.
Return the value generated by the FormBuilder for the given

Generate an HTML id attribute value for the given field
def field_id(method, *suffixes, namespace: @options[:namespace], index: @options[:index])
  @template.field_id(@object_name, method, *suffixes, namespace: namespace, index: index)
end