dgr-tw
Last Updated: February 25, 2016
·
1.966K
· geetotes
537449ba51eeff09dc6a5fc50a0b5d4f

Rails link helpers, Twitter Bootstrap, and HAML

To make this:

<a href="/thing/123" class="tip-top" data-confirm="Are you sure?" data-method="delete" data-original-title="Delete" rel="nofollow">
<i class="icon-remove"></i>
</a>

From this:

= link_to 'Delete', thing, :method => :delete, :data => { :confirm => 'Are you sure?' }, :class => "btn btn-danger btn-mini"

Try this:

= link_to thing, :method => :delete, :data => { :confirm => 'Are you sure?' }, "data-original-title" => "Delete", :class => "tip-top" do
 %i.icon-remove
Say Thanks
Respond