Button In Rails

[Solved] Button In Rails | Ruby - Code Explorer | yomemimo.com
Question : button in rails

Answered by : doubtful-dingo

<%= button_to "Delete Image", image_path(@image), method: :delete %>
#first argument is the button text; the second argument is an expression of a route, and method is used to tell the form to send its payload as an HTTP DELETE action

Source : | Last Update : Sat, 01 Feb 20

Answers related to button in rails

Code Explorer Popular Question For Ruby