5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 02:41:41 +00:00

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
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
# imita Model.update_attributes de ActiveRecord