Permalink
Browse files

Add confirmation dialog to book deletion

  • Loading branch information...
1 parent e09b4eb commit 55215e5f83b538366be1f1ab96f3b266c06eaa23 Tero Parviainen committed Mar 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/views/books/show.html.erb
View
2 app/views/books/show.html.erb
@@ -22,7 +22,7 @@
<%= render partial: "reservation_links", locals: {book: @book, reservation: @book_reservation} %>
</span>
-<%= link_to "Delete", book_path, method: :delete, class: 'btn btn-danger' %>
+<%= link_to "Delete", book_path, method: :delete, class: 'btn btn-danger', confirm: 'Are you sure?' %>
<p>
<%= link_to "Back to list", books_path %>

0 comments on commit 55215e5

Please sign in to comment.