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;' %> –