class ActionView::Helpers::FormBuilder

def id

element's submit button, regardless of where it exists in the DOM.
def id
  options.dig(:html, :id) || options[:id]
end