beewuu beewuu - 26 days ago 10
HTML Question

Making a custom x in shopping cart

I am trying a custom red x in my table as shown below.
mockup.

In my html I have

<td>$4.99</td>
<td><%= link_to 'Remove', purchase_path(a), method: :delete, data: {confirm: 'Are you sure?'} %></td


I want to replace the word 'Remove' with the x. I am having trouble how to go about this while keeping the link_to in place.

Answer

try this :

<%= link_to  purchase_path(a), method: :delete, data: {confirm: 'Are you sure?'} do %>
  YOUR ICON HERE
<% end %>
Comments