ruby on rails - How to rewrite deleting link_to helper to use it with glyphicon icon? -


i want unattractive delete link become glyphicon icon. how can rewrite following code?

   <%= link_to 'delete', user_task_path(current_user, task.id),         data: { confirm: 'are sure?' }, :method => :delete, remote: true %> 

try this

    <%= link_to user_task_path(current_user, task.id), method: :delete, data: { confirm: 'are sure?' }, remote: true %>       <i class="glyphicon glyphicon-trash"></i>     <% end %> 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -