Ruby on rails 如何将删除链接_重写为帮助器以与glyphicon图标一起使用?
我希望我不吸引人的删除链接变成一个glyphicon图标。如何重写以下代码Ruby on rails 如何将删除链接_重写为帮助器以与glyphicon图标一起使用?,ruby-on-rails,glyphicons,Ruby On Rails,Glyphicons,我希望我不吸引人的删除链接变成一个glyphicon图标。如何重写以下代码 <%= link_to 'Delete', user_task_path(current_user, task.id), data: { confirm: 'Are you sure?' }, :method => :delete, remote: true %> :删除,远程:真%> 试试这个 <%= link_to user_task_path(current_
<%= link_to 'Delete', user_task_path(current_user, task.id),
data: { confirm: 'Are you sure?' }, :method => :delete, remote: true %>
:删除,远程:真%>
试试这个
<%= link_to user_task_path(current_user, task.id), method: :delete, data: { confirm: 'Are you sure?' }, remote: true do %>
<i class="glyphicon glyphicon-trash"></i>
<% end %>