sin plantilla siempre tenemos los campos

This commit is contained in:
f 2018-07-27 10:45:32 -03:00
parent cc8dcee09a
commit 4a66a3ca35
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7

View file

@ -191,7 +191,11 @@ class Post
end end
def has_field?(field) def has_field?(field)
template && template.fetch_front_matter("has_#{field.to_s}", true) if template
template.fetch_front_matter("has_#{field.to_s}", true)
else
true
end
end end
# imita Model.update_attributes de ActiveRecord # imita Model.update_attributes de ActiveRecord