get_front_matter no acepta simbolos
This commit is contained in:
parent
21aedce0ea
commit
2a0279d669
1 changed files with 4 additions and 4 deletions
|
@ -5,7 +5,7 @@
|
|||
%li= error
|
||||
|
||||
-# TODO seleccionar la dirección por defecto según el idioma actual
|
||||
- direction = @post.get_front_matter(:dir) || 'ltr'
|
||||
- direction = @post.get_front_matter('dir') || 'ltr'
|
||||
-# string para configurar la clase con direccion de texto
|
||||
- field_class = "form-control #{direction}"
|
||||
-# TODO habilitar form_for
|
||||
|
@ -64,13 +64,13 @@
|
|||
%small.text-muted.form-text= t('posts.slug_help')
|
||||
.form-group
|
||||
= label_tag 'post_permalink', t('posts.permalink')
|
||||
= text_field 'post', 'permalink', value: @post.get_front_matter(:permalink),
|
||||
= text_field 'post', 'permalink', value: @post.get_front_matter('permalink'),
|
||||
class: 'form-control'
|
||||
%small.text-muted.form-text= t('posts.permalink_help')
|
||||
.form-group
|
||||
= label_tag 'post_layout', t('posts.layout')
|
||||
= select_tag 'post[layout]',
|
||||
options_for_select(@site.layouts, @post.get_front_matter(:layout)),
|
||||
options_for_select(@site.layouts, @post.get_front_matter('layout')),
|
||||
{ class: 'form-control select2' }
|
||||
%small.text-muted.form-text= t('posts.layout_help')
|
||||
- if @site.i18n?
|
||||
|
@ -80,7 +80,7 @@
|
|||
= label_tag 'post_lang', t("posts.lang.#{lang}")
|
||||
= select_tag "post[lang][#{lang}]",
|
||||
options_for_select(@site.posts_for(lang).map { |p| [p.title, p.id] },
|
||||
@post.get_front_matter(:lang).try(:dig, lang)),
|
||||
@post.get_front_matter('lang').try(:dig, lang)),
|
||||
{ class: 'form-control select2' }
|
||||
%small.text-muted.form-text= t('posts.lang_help')
|
||||
-# Genera todos los campos de la plantilla
|
||||
|
|
Loading…
Reference in a new issue