5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-06 14:05:45 +00:00

mas efectos secundario de get_front_matter

This commit is contained in:
f 2018-07-20 15:57:14 -03:00
parent f465ce3588
commit 97b2f7c87d
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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',