mas efectos secundario de get_front_matter
This commit is contained in:
parent
f465ce3588
commit
97b2f7c87d
2 changed files with 2 additions and 2 deletions
|
@ -278,7 +278,7 @@ class Post
|
|||
|
||||
# Obtiene metadatos de forma recursiva
|
||||
def get_front_matter(name)
|
||||
name = name.to_s if name.is_a? Symbol
|
||||
name = name.to_s unless name.is_a? Array
|
||||
@front_matter.dig(*name)
|
||||
end
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
-# Genera todos los campos de la plantilla
|
||||
- @post.template_fields.each do |template|
|
||||
- next unless type = template.type
|
||||
- value = @post.new? ? template.values : @post.get_front_matter(template)
|
||||
- value = @post.new? ? template.values : @post.get_front_matter(template.key)
|
||||
.form-group
|
||||
= label_tag "post_#{template}", id: template do
|
||||
= link_to '#' + template.key, class: 'text-muted',
|
||||
|
|
Loading…
Reference in a new issue