mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-22 04:41:48 +00:00
bug sutil que hacía fallar has_field
This commit is contained in:
parent
639ec4b5cc
commit
f5635aa2c8
1 changed files with 5 additions and 1 deletions
|
@ -327,7 +327,11 @@ class Post
|
||||||
|
|
||||||
# Como get_front_matter pero con un valor por defecto
|
# Como get_front_matter pero con un valor por defecto
|
||||||
def fetch_front_matter(name, default)
|
def fetch_front_matter(name, default)
|
||||||
get_front_matter(name) || default
|
r = get_front_matter(name)
|
||||||
|
|
||||||
|
# Solo cuando es nulo, sino devolvemos el default si el valor es
|
||||||
|
# false
|
||||||
|
r.nil? ? default : r
|
||||||
end
|
end
|
||||||
|
|
||||||
# Trae el template a partir del layout
|
# Trae el template a partir del layout
|
||||||
|
|
Loading…
Reference in a new issue