Added delete button to snippet view

This commit is contained in:
Jack Weeden 2013-06-24 23:55:37 +01:00
parent 905eb17614
commit 1aeebdf681
1 changed files with 1 additions and 0 deletions

View File

@ -6,6 +6,7 @@
.btn-group.tree-btn-group.pull-right
- if @snippet.author == current_user
= link_to "Edit", edit_snippet_path(@snippet), class: "btn btn-tiny", title: 'Edit Snippet'
= link_to "Delete", snippet_path(@snippet), method: :delete, confirm: "Are you sure?", class: "btn btn-tiny", title: 'Delete Snippet'
= link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank"
.file_content.code
- unless @snippet.content.empty?