class ActionView::Helpers::FormBuilder
def id
element should be treated as the
form HTML attribute, we hint to the browser that the generated
exist outside of the element. By declaring the
In the example above, the :sticky_footer content area will
<% end %>
<% end %>
<%= form.button(form: f.id) %>
<% content_for :sticky_footer do %>
<%# ... %>
<%= form_for @post do |f| %>
return the element's id attribute.
Generate an HTML id attribute value.
def id options.dig(:html, :id) || options[:id] end