From ab98119cfeb902ecab150e9b1898fa88890a2b25 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 6 Oct 2023 10:04:53 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20encontrar=20el=20post=20a=20editar=20de?= =?UTF-8?q?sde=20su=20indexaci=C3=B3n=20#7537?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/posts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 9720fe13..77354be1 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -160,7 +160,7 @@ class PostsController < ApplicationController end def post - @post ||= site.posts(lang: locale).find(params[:post_id] || params[:id]) + @post ||= site.indexed_posts.find_by!(locale: locale, path: params[:post_id] || params[:id]).post end # Recuerda el nombre del servicio de subida de archivos