From 7df467aad065c8666163468a88aa37cc9ea53ed0 Mon Sep 17 00:00:00 2001 From: bodrovis Date: Thu, 24 Sep 2015 20:43:23 +0300 Subject: [PATCH] minor updates --- Authorization_with_Pundit/app/views/posts/_post.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Authorization_with_Pundit/app/views/posts/_post.html.erb b/Authorization_with_Pundit/app/views/posts/_post.html.erb index 290b1e7..86cbeb7 100644 --- a/Authorization_with_Pundit/app/views/posts/_post.html.erb +++ b/Authorization_with_Pundit/app/views/posts/_post.html.erb @@ -4,7 +4,7 @@ <%= post.special? %> <%= link_to 'Show', post %> <%= link_to 'Edit', edit_post_path(post) %> - <% if true %> + <% if policy(post).destroy? %> <%= link_to 'Destroy', post, method: :delete, data: { confirm: 'Are you sure?' } %> <% end %> \ No newline at end of file