From 9e935a2c49ce62d32ad716157d817ad759d940f5 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 10 May 2021 15:28:04 -0300 Subject: [PATCH] poder ver las categorias que son articulos --- app/views/posts/index.haml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/posts/index.haml b/app/views/posts/index.haml index 291945a..3535634 100644 --- a/app/views/posts/index.haml +++ b/app/views/posts/index.haml @@ -99,9 +99,13 @@ - unless post.categories.value.empty? %br %small - - (post.categories.respond_to?(:belongs_to) ? post.categories.belongs_to : post.categories.value).each do |c| + - categories = post.categories.respond_to?(:has_many) ? post.categories.has_many : post.categories.value + - categories.each do |c| + - c.read = link_to site_posts_path(@site, category: (c.respond_to?(:uuid) ? c.uuid.value : c)) do %span{ lang: post.lang.value, dir: dir }= (c.respond_to?(:title) ? c.title.value : c) + - unless categories.last == c + = '/' %td = post.date.value.strftime('%F')