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:
parent
cc8dcee09a
commit
4a66a3ca35
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue