From 3c8babb7d4ec1cdae1976b938bf4cf14ca985fc4 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 6 Nov 2019 18:43:03 -0300 Subject: [PATCH] aplicar filtro de categorias antes de verificar que le usuarie pueda ver el articulo --- app/views/posts/index.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/posts/index.haml b/app/views/posts/index.haml index 8aa1173..3896354 100644 --- a/app/views/posts/index.haml +++ b/app/views/posts/index.haml @@ -31,13 +31,13 @@ %table.table.table-condensed.table-draggable %tbody - @posts.each_with_index do |post, i| - - next unless policy(post).show? -# saltearse el post a menos que esté en la categoría por la que estamos filtrando - if @category - next unless post.attributes.include? :categories - next unless post.categories.value.include?(@category) + - next unless policy(post).show? %tr %td .handle