From d601f370455ce1ff7dad48210d74899de8639280 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 6 Oct 2023 09:54:25 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20a=20partir=20del=20post=20indexado=20ob?= =?UTF-8?q?tener=20la=20ubicaci=C3=B3n=20del=20archivo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/indexed_post.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/models/indexed_post.rb b/app/models/indexed_post.rb index 7f6865f6..7e58b7bc 100644 --- a/app/models/indexed_post.rb +++ b/app/models/indexed_post.rb @@ -36,6 +36,13 @@ class IndexedPost < ApplicationRecord belongs_to :site + # La ubicaciĆ³n del Post en el disco + # + # @return [String] + def full_path + @full_path ||= File.join(site.path, "_#{locale}", "#{path}.markdown") + end + # Convertir locale a direccionario de PG # # @param [String,Symbol]