📜  rails 中的按钮 - Ruby 代码示例

📅  最后修改于: 2022-03-11 15:04:45.298000             🧑  作者: Mango

代码示例1
<%= 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