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