5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-10-05 22:26:56 +00:00

no fallar si el campo no tiene valor

This commit is contained in:
f 2018-06-21 14:34:28 -03:00
parent 66e37ca736
commit 688459d64e
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7

View file

@ -23,7 +23,7 @@
- if @post.new?
- value = nf.values
- else
- value = @post.get_front_matter(template)[nf]
- value = @post.get_front_matter(template.key).try(:[], nf.key)
= render 'posts/template_field/nested',
template: nf,
value: value,