From f94b579a25aca8936a75a07dc16d9e8a06531b8b Mon Sep 17 00:00:00 2001 From: f Date: Fri, 27 Oct 2023 14:06:19 -0300 Subject: [PATCH] fixup! fix: has_one es como belongs_to (cherry picked from commit 7a0443d7cc0e5ee65b18bd504ab66434bbd231ef) --- app/views/posts/attribute_ro/_has_one.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/posts/attribute_ro/_has_one.haml b/app/views/posts/attribute_ro/_has_one.haml index 425e659e..fafccd34 100644 --- a/app/views/posts/attribute_ro/_has_one.haml +++ b/app/views/posts/attribute_ro/_has_one.haml @@ -1,6 +1,6 @@ %tr{ id: attribute } %th= post_label_t(attribute, post: post) %td{ dir: dir, lang: locale } - - p = metadata.has_one + - p = site.indexed_posts.find_by_post_id(metadata.value) - if p - = link_to p.title.value, site_post_path(site, p.id) + = link_to p.title, site_post_path(site, p.post_id)