We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
If all you need is a button from a form, but not have anything else in a form, you can use button-to.
To create a button which points back to the same controller and action but with text “Submit” use:
(button-to "Submit" request-map)
If you want to point to a different action you can pass a params map:
(button-to "Submit" request-map { :action "show" })
The params map has the same options as form-for. However, :html-options is applied only to the button and not the form tag.
Button-to also accepts a function for text:
(button-to #(:action %) request-map { :action "show" })
The above button-to call displays “show” as it’s text.