aplicar filtro de categorias antes de verificar que le usuarie pueda ver el articulo
This commit is contained in:
parent
b0cffa9cfb
commit
3c8babb7d4
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue