5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 15:36:22 +00:00

fix: obtener el post indexado a partir del post

This commit is contained in:
f 2023-10-26 18:10:58 -03:00
parent e34392e77c
commit 3b656f1908
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View file

@ -63,11 +63,6 @@ class Post
end
end
# @return [IndexedPost,nil]
def indexed_post
site.indexed_posts.find_by(locale: lang.value, path: id)
end
# Redefinir el inicializador de OpenStruct
#
# @param :site [Site] el sitio en Sutty

View file

@ -10,6 +10,11 @@ class Post
after_save :index!
after_destroy :remove_from_index!
# @return [IndexedPost,nil]
def indexed_post
site.indexed_posts.find_by_post_id(uuid.value)
end
# Devuelve una versión indexable del Post
#
# @return [IndexedPost]