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:
parent
5c8d1df6c7
commit
d4f85da018
1 changed files with 7 additions and 0 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue