no fallar si no hay template

This commit is contained in:
f 2018-07-20 15:17:44 -03:00
parent 9fd73d0c38
commit a60f24c82b
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7

View file

@ -187,7 +187,7 @@ class Post
# Determina si el post lleva contenido o es solo front_matter
def content?
template.fetch_front_matter('has_content', true)
template && template.fetch_front_matter('has_content', true)
end
# imita Model.update_attributes de ActiveRecord