0
<%= link_to "[Delete]", customer_path(customer.id, :customer_delete => true), :method => :delete, :data => {:confirm => "Are You Sure?"} %>
我上面的代碼工作正常,的Rails的link_to的破壞行動:如何傳遞參數,數據的確認動作和造我的CSS
但如何給我的link_to色說IKE紅色在我看來, ?試了很多堆棧溢出的線程,但作爲我的link_to包含像傳遞參數數據的確認動作的組合功能
有沒有辦法給它內嵌於不使用類的link_to新的鏈接? –
是的,試試這個: –
<%= link_to「[刪除]」,customer_path(customer.id,:customer_delete => true),:method =>:delete,:data => {:confirm =>「Are You好嗎?「},:style =>'color:red;' %> –