sin plantilla siempre tenemos los campos
This commit is contained in:
parent
cc8dcee09a
commit
4a66a3ca35
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue