mirror of
https://0xacab.org/sutty/sutty
synced 2025-01-19 17:03:38 +00:00
no fallar si no hay template
This commit is contained in:
parent
9fd73d0c38
commit
a60f24c82b
1 changed files with 1 additions and 1 deletions
|
@ -187,7 +187,7 @@ class Post
|
||||||
|
|
||||||
# Determina si el post lleva contenido o es solo front_matter
|
# Determina si el post lleva contenido o es solo front_matter
|
||||||
def content?
|
def content?
|
||||||
template.fetch_front_matter('has_content', true)
|
template && template.fetch_front_matter('has_content', true)
|
||||||
end
|
end
|
||||||
|
|
||||||
# imita Model.update_attributes de ActiveRecord
|
# imita Model.update_attributes de ActiveRecord
|
||||||
|
|
Loading…
Reference in a new issue