bluerail / twitter-bootstrap-rails-confirm

Confirm dialogs using Twitter Bootstrap
https://bluerail.nl
MIT License
85 stars 34 forks source link

icons in data-confirm-title ? #30

Closed mfrederickson closed 8 years ago

mfrederickson commented 9 years ago

How do I show a font-awesome icon in the title? The following does not work:

"data-confirm-title" => "<i class='fa fa-trash'></i> Delete User".html_safe
corejh commented 9 years ago

This worked just fine for me

<%= link_to user_path(@user), class: "btn btn-danger", data: {confirm: "Are you sure?", "confirm-title": '<span class="fa fa-trash-o"> Delete User' } do %><span class="fa fa-trash-o"> Delete User</span><% end %>
rvanlieshout commented 8 years ago

a) why wouldn't that work? b) Something like corejh proposed feels right for now