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
Written by Lee
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#