ActionView::Helpers::UrlHelper
button_to
API docs (Rails 8.1.4.1) ↗def button_to(name = nil, options = nil, html_options = nil, &block)
Description
Creates a <form> that contains only a <button>.
ERB
Changes from the previous output: Added Removed Changed
HTML
Preview
Interacting with the preview updates the form submission.
Form submission
Form data
| name | value |
|---|
Request body
Content-Type:
params
This site shows the CSRF token as
(hidden). The real token is a long string that changes on every render.