Correctly check if user can destroy a document
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
class: 'button hollow' %>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<% if can? :destroy, Document %>
|
||||
<% if can?(:destroy, document) %>
|
||||
<%= link_to t('documents.buttons.destroy_document'),
|
||||
document_path(document, from: request.url), method: :delete,
|
||||
data: { confirm: t('documents.actions.destroy.confirm') },
|
||||
|
||||
Reference in New Issue
Block a user