button_to :action => 'destroy' looks for 'show'

前端 未结 2 1973
醉梦人生
醉梦人生 2020-12-29 04:39

This seems incredibly similar to a question I had answered just a few days ago, but the solution then isn\'t working now.

I\'m building a rails app, and I am trying

2条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-29 05:37

    I know it is way too late for an answer but hope it may help somebody(using Rails 4).

     <%= button_to "delete", meal_path(:id => recipe.id), :method => :delete %>
    

提交回复
热议问题