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

feat: detectar si un post existe en disco

This commit is contained in:
f 2023-10-06 10:15:57 -03:00
parent 5c8d1df6c7
commit d4f85da018
No known key found for this signature in database

View file

@ -87,6 +87,13 @@ class IndexedPost < ApplicationRecord
site.layouts[layout.to_sym]
end
# Existe físicamente?
#
# @return [Boolean]
def exist?
File.exist?(full_path)
end
# Convertir locale a direccionario de PG
#
# @param [String,Symbol]